public InstanceResolver(DependencyDefinitionCollection definitions, InstanceStorage instances)
 {
     Ensure.NotNull(definitions, "definitions");
     Ensure.NotNull(instances, "instances");
     this.definitions = definitions;
     this.instances   = instances;
 }
        public DependencyDefinitionCollection(string scopeName, InstanceStorage instances, DependencyDefinitionCollection parentCollection)
            : this(scopeName, instances)
        {
            Ensure.NotNull(parentCollection, "parentCollection");
            this.parentCollection = parentCollection;

            IEnumerable <DependencyDefinition> definitions;

            if (parentCollection.TryGetChild(scopeName, out definitions))
            {
                foreach (DependencyDefinition definition in definitions)
                {
                    Add(definition.RequiredType, definition.Lifetime, definition.Target);
                }
            }
        }
 public DependencyDefinitionCollection(string scopeName, InstanceStorage instances)
 {
     Ensure.NotNull(instances, "instances");
     ScopeName      = scopeName;
     this.instances = instances;
 }