Beispiel #1
0
 /// <summary>
 /// Registers an service to be created on each request.
 /// </summary>
 /// <typeparam name="TImplementation">The type of the implementation.</typeparam>
 /// <param name="container">The container.</param>
 /// <returns>The container.</returns>
 public static SimpleContainer PerRequest <TImplementation>(this SimpleContainer container)
 {
     container.RegisterPerRequest(typeof(TImplementation), null, typeof(TImplementation));
     return(container);
 }
Beispiel #2
0
 /// <summary>
 /// Registers an service to be created on each request.
 /// </summary>
 /// <typeparam name="TService">The type of the service.</typeparam>
 /// <typeparam name="TImplementation">The type of the implementation.</typeparam>
 /// <param name="container">The container.</param>
 /// <returns>The container.</returns>
 public static SimpleContainer PerRequest <TService, TImplementation>(this SimpleContainer container)
     where TImplementation : TService
 {
     container.RegisterPerRequest(typeof(TService), null, typeof(TImplementation));
     return(container);
 }