public TransientLifecycleTester() { theContext = MockRepository.GenerateMock <ILifecycleContext>(); theLifecycle = new TransientLifecycle(); theCache = MockRepository.GenerateMock <ITransientTracking>(); theContext.Stub(x => x.Transients).Return(theCache); }
public TransientLifecycleTester() { theContext = Substitute.For <ILifecycleContext>(); theLifecycle = new TransientLifecycle(); theCache = Substitute.For <ITransientTracking>(); theContext.Transients.Returns(theCache); }
public TransientLifecycleTester() { theContext = Substitute.For<ILifecycleContext>(); theLifecycle = new TransientLifecycle(); theCache = Substitute.For<ITransientTracking>(); theContext.Transients.Returns(theCache); }
private static ITransientTracking chooseTransientTracking(PluginGraph pluginGraph) { ITransientTracking transients = pluginGraph.TransientTracking == TransientTracking.DefaultNotTrackedAtRoot ? (ITransientTracking) new NulloTransientCache() : new TrackingTransientCache(); return(transients); }
public TransientLifecycleTester() { theContext = MockRepository.GenerateMock<ILifecycleContext>(); theLifecycle = new TransientLifecycle(); theCache = MockRepository.GenerateMock<ITransientTracking>(); theContext.Stub(x => x.Transients).Return(theCache); }
public static IPipelineGraph BuildRoot(PluginGraph pluginGraph) { ITransientTracking transients = pluginGraph.TransientTracking == TransientTracking.DefaultNotTrackedAtRoot ? (ITransientTracking) new NulloTransientCache() : new TrackingTransientCache(); return(new PipelineGraph(pluginGraph, new RootInstanceGraph(pluginGraph), null, pluginGraph.SingletonCache, transients)); }
public PipelineGraph(PluginGraph pluginGraph, IInstanceGraph instances, IPipelineGraph root, IObjectCache singletons, ITransientTracking transients) { _pluginGraph = pluginGraph; _instances = instances; if (root == null) { _root = this; _profiles = new Profiles(_pluginGraph, this); ContainerCache = singletons; } else { _root = root.Root(); _profiles = root.Profiles; ContainerCache = new ContainerSpecificObjectCache(); } _singletons = singletons; _transients = transients; }
private void changeTransientTracking(TransientTracking transientTracking) { _pluginGraph.TransientTracking = transientTracking; _transients = chooseTransientTracking(_pluginGraph); }