Fix PoliCheck violations.

This commit is contained in:
Levi B 2015-03-10 23:40:39 -07:00
parent e8cc1106d8
commit bb1b49cc1c
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ namespace Microsoft.AspNet.DataProtection.Repositories
public virtual IReadOnlyCollection<XElement> GetAllElements()
{
// force complete enumeration under lock to avoid races
// force complete enumeration under lock for thread safety
lock (_storedElements)
{
return GetAllElementsCore().ToList().AsReadOnly();
@ -49,7 +49,7 @@ namespace Microsoft.AspNet.DataProtection.Repositories
{
XElement cloned = new XElement(element); // makes a deep copy so caller doesn't inadvertently modify it
// under lock to avoid races
// under lock for thread safety
lock (_storedElements)
{
_storedElements.Add(cloned);