Interface ISoHttpContextItemsAccessor
Access HttpContext.Items from ASP.NET or ASP.NET Core or test-double.
Namespace: SuperOffice.WebApi
Assembly: SoCore.dll
Syntax
public interface ISoHttpContextItemsAccessor
Remarks
Use UseHttpContextItemsAccessor<T>() to configure implementation of ISoHttpContextItemsAccessor
Methods
Set<T>(string, T)
Access HttpContext.Items from ASP.NET or ASP.NET Core or test-double.
Declaration
void Set<T>(string key, T item)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | |
| T | item |
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
Use UseHttpContextItemsAccessor<T>() to configure implementation of ISoHttpContextItemsAccessor
TryGet<T>(string, out T)
Access HttpContext.Items from ASP.NET or ASP.NET Core or test-double.
Declaration
bool TryGet<T>(string key, out T item)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | |
| T | item |
Returns
| Type | Description |
|---|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
Use UseHttpContextItemsAccessor<T>() to configure implementation of ISoHttpContextItemsAccessor