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