コード例 #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));
        }