Exemplo n.º 1
0
 public ObjectFactoryDescription(DefaultConstruction defaultConstruction,
                                 ConstructionWithArgs constructionWithArgs)
 {
     _default     = defaultConstruction;
     _params      = constructionWithArgs;
     _factoryType = ObjectFactoryType.Delegate;
 }
Exemplo n.º 2
0
        protected override object CreateBehavior()
        {
            Type objectFactory;

            try
            {
                objectFactory = ObjectFactoryType.GetType <IDependencyResolver>();
            }
            catch (Exception e)
            {
                throw new Exception(string.Format("Invalid objectFactoryType specified in dependencyInjection behavior element. {0}", e));
            }

            return(new DependencyInjectionBehavior(objectFactory));
        }
Exemplo n.º 3
0
 public ObjectFactoryDescription(IObjectFactory objectFactory)
 {
     _objectFactory = objectFactory;
     _factoryType   = ObjectFactoryType.Class;
 }