Exemplo n.º 1
0
        public void Build()
        {
            var transientPolicies = new PolicyList(policies);
            var context           = new BuilderContext(new UnityContainer(), strategies, null, policies, transientPolicies, new NamedTypeBuildKey <object>(), null);

            Result = strategies.ExecuteBuildUp(context);
        }
        public object NewBuildUp(Type type, string name, Action <IBuilderContext> childCustomizationBlock = null)
        {
            var newContext = new MockBuilderContext
            {
                strategies         = strategies,
                persistentPolicies = persistentPolicies,
                policies           = new PolicyList(persistentPolicies),
                lifetime           = lifetime,
                originalBuildKey   = buildKey,
                buildKey           = new NamedTypeBuildKey(type, name),
                existing           = null
            };

            newContext.resolverOverrides.Add(resolverOverrides);

            childCustomizationBlock(newContext);

            return(strategies.ExecuteBuildUp(newContext));
        }