public RepositoryBaseTest() { _container = new WindsorContainer(); NoTrackingReleasePolicy policy = new NoTrackingReleasePolicy(); _container.Kernel.ReleasePolicy = policy; _container.Register(Component .For<IObjectContextManager>() .ImplementedBy<ObjectContextManager>() .Named("ObjectContextManager") .LifeStyle.Transient); _windsorServiceLocator = new WindsorServiceLocator(_container); ServiceLocator.SetLocatorProvider(() => _windsorServiceLocator); }
/// <summary> /// Initializes a new instance of the <see cref = "CreationContext" /> class. /// </summary> private CreationContext() { ReleasePolicy = new NoTrackingReleasePolicy(); handlerStack = new Stack<IHandler>(4); resolutionStack = new Stack<ResolutionContext>(4); }
/// <summary> /// Initializes a new instance of the <see cref = "CreationContext" /> class. /// </summary> private CreationContext() { #pragma warning disable 612,618 ReleasePolicy = new NoTrackingReleasePolicy(); #pragma warning restore 612,618 handlerStack = new Stack<IHandler>(4); resolutionStack = new Stack<ResolutionContext>(4); }