Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule.GetScope C# (CSharp) Méthode

GetScope() static private méthode

static private GetScope ( ) : ILifetimeScope
Résultat ILifetimeScope
		internal static ILifetimeScope GetScope()
		{
			EnsureInitialized();
			var context = HttpContext.Current;
			if (context == null)
			{
				throw new InvalidOperationException(
					"HttpContext.Current is null. PerWebRequestLifestyle can only be used in ASP.Net");
			}
			return GetScope(context, createIfNotPresent: true);
		}

Same methods

PerWebRequestLifestyleModule::GetScope ( HttpContext context, bool createIfNotPresent ) : ILifetimeScope

Usage Example

 public ILifetimeScope GetScope(CreationContext context)
 {
     return(PerWebRequestLifestyleModule.GetScope());
 }