Пример #1
0
        private MockStrategyChain GetStrategies()
        {
            MockStrategyChain chain = new MockStrategyChain();

            chain.Add(new LifetimeStrategy());
            chain.Add(new SleepingStrategy());
            chain.Add(new NewObjectStrategy());
            return(chain);
        }
Пример #2
0
        private BuilderContext GetContext(IUnityContainer container, NamedTypeBuildKey buildKey)
        {
            var strategies = new MockStrategyChain();

            strategies.Add(new ReturnContainerStrategy(container));
            PolicyList persistentPolicies = new PolicyList();
            PolicyList transientPolicies  = new PolicyList(persistentPolicies);

            return(new BuilderContext(new UnityContainer(), strategies, null, persistentPolicies, transientPolicies, buildKey, null));
        }