Core.ObjectsResolution - refactor, cleanup, sanitize, ensure we properly freeze

This commit is contained in:
Stephan
2013-01-16 13:31:04 -01:00
parent bfd8e96f71
commit 01b4e8d59c
29 changed files with 151 additions and 120 deletions

View File

@@ -149,9 +149,8 @@ namespace Umbraco.Core.ObjectResolution
{
EnsureAddSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
using (Resolution.Configuration)
using (GetWriteLock())
{
foreach (var t in types)
{
@@ -168,9 +167,8 @@ namespace Umbraco.Core.ObjectResolution
{
EnsureAddSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
using (Resolution.Configuration)
using (GetWriteLock())
{
_listOfTypeListDelegates.Add(typeListDelegate);
}
@@ -184,9 +182,8 @@ namespace Umbraco.Core.ObjectResolution
{
EnsureAddSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
using (Resolution.Configuration)
using (GetWriteLock())
{
_lazyTypeList.Add(value);
}
@@ -208,9 +205,8 @@ namespace Umbraco.Core.ObjectResolution
{
EnsureClearSupport();
EnsureResolutionNotFrozen();
using (GetWriteLock())
using (Resolution.Configuration)
using (GetWriteLock())
{
_lazyTypeList.Clear();
}