Beispiel #1
0
 public static TinyIoCContainer.MultiRegisterOptions AsPerThreadMultiInstance(this TinyIoCContainer.MultiRegisterOptions registerOptions)
 {
     return(TinyIoCContainer.MultiRegisterOptions.ToCustomLifetimeManager(registerOptions, new PerThreadLifetimeProvider(), "per thread singleton"));
 }
 public static TinyIoCContainer.MultiRegisterOptions AsPerRequestSingleton(this TinyIoCContainer.MultiRegisterOptions registerOptions)
 {
     return(TinyIoCContainer.MultiRegisterOptions.ToCustomLifetimeManager(registerOptions, new HttpContextLifetimeProvider(), "per request singleton"));
 }
Beispiel #3
0
 public static TinyIoCContainer.MultiRegisterOptions AsPerRequestSingleton(this TinyIoCContainer.MultiRegisterOptions registerOptions)
 {
     return(TinyIoCContainer.MultiRegisterOptions.ToCustomLifetimeManager(registerOptions,
                                                                          new TinyIoCThreadSingletonLifetimeManager(),
                                                                          "per thread singleton"));
 }