Esempio n. 1
0
 public Func <T> Create(SimpleContainer container)
 {
     return(() => (T)container.GetInstance(typeof(T), null));
 }
Esempio n. 2
0
 public static void RegisterSingleton <TService, TImplementation>(this SimpleContainer container)
     where TImplementation : TService
 {
     container.RegisterSingleton(typeof(TService), null, typeof(TImplementation));
 }
Esempio n. 3
0
 public static void RegisterInstance <TService>(this SimpleContainer container, TService instance)
 {
     container.RegisterInstance(typeof(TService), null, instance);
 }
Esempio n. 4
0
 public static void RegisterPerRequestPageVM(this SimpleContainer container, Type viewModelType)
 {
     container.RegisterPerRequest(viewModelType, viewModelType.Name, viewModelType);
 }
Esempio n. 5
0
 public static void RegisterPerRequestPageVM <TViewModel>(this SimpleContainer container)
 {
     container.RegisterPerRequestPageVM(typeof(TViewModel));
 }
Esempio n. 6
0
 public static void RegisterPerRequest <TService, TImplementation>(this SimpleContainer container)
     where TImplementation : TService
 {
     container.RegisterPerRequest(typeof(TService), null, typeof(TImplementation));
 }