Class HttpContextDependencyInjectionExtensions
Dependency injection extensions for HttpContext.
Inheritance
System.Object
HttpContextDependencyInjectionExtensions
Namespace: DotNetNuke.Common.Extensions
Assembly: DotNetNuke.dll
Syntax
public static class HttpContextDependencyInjectionExtensions : object
Methods
| Improve this Doc View SourceClearScope(HttpContext)
Clears the service scope for the http context.
Declaration
public static void ClearScope(this HttpContext httpContext)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | httpContext | The http context on which to clear the service scope. |
ClearScope(HttpContextBase)
Clears the service scope for the http context.
Declaration
public static void ClearScope(this HttpContextBase httpContext)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContextBase | httpContext | The http context on which to clear the service scope. |
GetScope(HttpContext)
Gets the http context service scope.
Declaration
public static IServiceScope GetScope(this HttpContext httpContext)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | httpContext | The http context from which to get the scope from. |
Returns
| Type | Description |
|---|---|
| IServiceScope | A service scope. |
GetScope(HttpContextBase)
Gets the http context base service scope.
Declaration
public static IServiceScope GetScope(this HttpContextBase httpContext)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContextBase | httpContext | The http context base from which to get the scope from. |
Returns
| Type | Description |
|---|---|
| IServiceScope | A service scope. |
SetScope(HttpContext, IServiceScope)
Sets the service scope for the http context.
Declaration
public static void SetScope(this HttpContext httpContext, IServiceScope scope)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | httpContext | The http context. |
| IServiceScope | scope | The service scope. |
SetScope(HttpContextBase, IServiceScope)
Sets the service scope for the http context base.
Declaration
public static void SetScope(this HttpContextBase httpContext, IServiceScope scope)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContextBase | httpContext | The http context base. |
| IServiceScope | scope | The service scope. |