public ObjectFactoryDescription(DefaultConstruction defaultConstruction,
                                 ConstructionWithArgs constructionWithArgs)
 {
     _default     = defaultConstruction;
     _params      = constructionWithArgs;
     _factoryType = ObjectFactoryType.Delegate;
 }
Esempio n. 2
0
 public static void SetObjectFactory(Type type, DefaultConstruction defaultConstruction,
                                     ConstructionWithArgs constructionWithArgs)
 {
     lock (_objectFactories)
     {
         ObjectFactoryDescription fd = new ObjectFactoryDescription(defaultConstruction, constructionWithArgs);
         if (_objectFactories.ContainsKey(type.ToString()))
         {
             _objectFactories[type.ToString()] = fd;
         }
         else
         {
             _objectFactories.Add(type.ToString(), fd);
         }
     }
 }