Beispiel #1
0
 public Factory(Dictionary <Type, Func <object[], object> > scopeds, Dictionary <Type, Func <object[], object> > singletons)
 {
     _scopeds            = scopeds;
     _singletons         = singletons;
     _singletonContainer = new InstanceContainer(_singletons, _singletons.Select(s => s.Key).ToList());
     _scopes             = new List <IIncrementableScope>();
 }
Beispiel #2
0
 internal Scope(Dictionary <Type, Func <object[], object> > initializers, InstanceContainer singletonInstances)
 {
     _instances          = new InstanceContainer(initializers, singletonInstances.RegisteredTypes.Union(initializers.Select(s => s.Key).ToList()).ToList());
     _singletonInstances = singletonInstances;
 }