Esempio n. 1
0
 public static DIContainer Register <TContract, TImpl>(this DIContainer container, string name = null)
     where TImpl : TContract
 {
     container.Register(typeof(TContract), typeof(TImpl), name);
     return(container);
 }
Esempio n. 2
0
 public static T Build <T>(this DIContainer container, string name = null)
     where T : class
 {
     return(container.Build(typeof(T), name) as T);
 }