Makes ApplicationContext disposable so that 3rd party devs are able to reset their applications (or unit tests), updated

resolution and created a ResolverCollection to track all resolvers created so it's super easy to reset all of them at once
(which is what happens on ApplicationContext.Dispose. ApplicationContext.Dispose is also implicitly implemented as to not
show in intellisense that the Dispose method exists... must be cast to IDisposable to work.
This commit is contained in:
Shannon Deminick
2013-03-12 01:50:56 +04:00
parent cc50003e3e
commit 164f22aa50
9 changed files with 204 additions and 24 deletions

View File

@@ -13,7 +13,7 @@ namespace Umbraco.Core.ObjectResolution
/// </remarks>
public abstract class SingleObjectResolverBase<TResolver, TResolved> : ResolverBase<TResolver>
where TResolved : class
where TResolver : class
where TResolver : ResolverBase
{
private readonly ReaderWriterLockSlim _lock = new ReaderWriterLockSlim();
private readonly bool _canBeNull;