예제 #1
0
파일: TinyContainer.cs 프로젝트: ted9/cqrs
 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"));
 }
예제 #3
0
 public static TinyIoCContainer.MultiRegisterOptions AsPerRequestSingleton(this TinyIoCContainer.MultiRegisterOptions registerOptions)
 {
     return(TinyIoCContainer.MultiRegisterOptions.ToCustomLifetimeManager(registerOptions,
                                                                          new TinyIoCThreadSingletonLifetimeManager(),
                                                                          "per thread singleton"));
 }