Example #1
0
 public static BindingInfo <T> FromMethod(Func <IIocContainer, IList <IIocParameter>, T> methodBindingDelegate,
                                          DependencyLifecycle lifecycle, string name = null, params IIocParameter[] parameters)
 {
     Should.NotBeNull(methodBindingDelegate, "methodBindingDelegate");
     return(new BindingInfo <T>(null, methodBindingDelegate, default(T), lifecycle, name, parameters));
 }
Example #2
0
 public static BindingInfo <T> FromType <TService>(DependencyLifecycle lifecycle, string name = null, params IIocParameter[] parameters)
     where TService : T
 {
     return(new BindingInfo <T>(typeof(TService), null, default(T), lifecycle, name, parameters));
 }
Example #3
0
 public static BindingInfo <T> FromType(Type serviceType, DependencyLifecycle lifecycle, string name = null, params IIocParameter[] parameters)
 {
     Should.NotBeNull(serviceType, "serviceType");
     Should.BeOfType <T>(serviceType, "serviceType");
     return(new BindingInfo <T>(serviceType, null, default(T), lifecycle, name, parameters));
 }
Example #4
0
 /// <summary>
 ///     Creates an instance of BindingInfo from a type.
 /// </summary>
 public static BindingInfo<T> FromType<TService>(DependencyLifecycle lifecycle, string name = null)
     where TService : T
 {
     return new BindingInfo<T>(typeof(TService), null, default(T), lifecycle, name);
 }