Removed Freezing event as we won't need it

This commit is contained in:
shannon@ShandemVaio
2012-07-27 06:02:41 +06:00
parent 8082abc27a
commit 92f983a569
3 changed files with 5 additions and 30 deletions

View File

@@ -49,7 +49,7 @@ namespace Umbraco.Core.Resolving
using (new WriteLock(Lock))
{
_resolved.Add(item);
}
}
}
public void Clear()
@@ -58,7 +58,7 @@ namespace Umbraco.Core.Resolving
using (new WriteLock(Lock))
{
_resolved.Clear();
}
}
}
public void Insert(int index, TResolved item)
@@ -67,7 +67,7 @@ namespace Umbraco.Core.Resolving
using (new WriteLock(Lock))
{
_resolved.Insert(index, item);
}
}
}
}

View File

@@ -9,7 +9,6 @@ namespace Umbraco.Core.Resolving
internal class Resolution
{
public static event EventHandler Freezing;
public static event EventHandler Frozen;
public static bool IsFrozen { get; private set; }
@@ -24,8 +23,7 @@ namespace Umbraco.Core.Resolving
{
if (Resolution.IsFrozen)
throw new InvalidOperationException("Resolution is frozen. It is not possible to freeze it again.");
if (Freezing != null)
Freezing(null, null);
IsFrozen = true;
if (Frozen != null)
Frozen(null, null);

View File

@@ -8,30 +8,7 @@ using Umbraco.Core.Resolving;
namespace Umbraco.Tests
{
[TestFixture]
public class MultipleResolverBaseTests
{
internal class MyItemsResolver : MultipleResolverBase<MyItemsResolver, object>
{
public MyItemsResolver(IEnumerable<object> initItems)
{
foreach(var i in initItems)
{
Add(i);
}
}
public IEnumerable<object> MyItems
{
get { return Values; }
}
}
}
[TestFixture]
public class EnumerableExtensionsTests
{