CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.AspNetCore.ApplicationContextManagerHttpContext Class Reference

Application context manager that uses HttpContextAccessor when resolving HttpContext to store context values. More...

Inheritance diagram for Csla.AspNetCore.ApplicationContextManagerHttpContext:
Csla.Core.IContextManager

Public Member Functions

 ApplicationContextManagerHttpContext (IHttpContextAccessor httpContextAccessor, IRuntimeInfo runtimeInfo)
 Creates an instance of the object, initializing it with the required IServiceProvider. More...
 
System.Security.Principal.IPrincipal GetUser ()
 Gets the current principal. More...
 
void SetUser (System.Security.Principal.IPrincipal principal)
 Sets the current principal. More...
 
ContextDictionary GetLocalContext ()
 Gets the local context. More...
 
void SetLocalContext (ContextDictionary localContext)
 Sets the local context. More...
 
ContextDictionary GetClientContext (ApplicationContext.ExecutionLocations executionLocation)
 Gets the client context. More...
 
void SetClientContext (ContextDictionary clientContext, ApplicationContext.ExecutionLocations executionLocation)
 Sets the client context. More...
 
- Public Member Functions inherited from Csla.Core.IContextManager
void SetUser (IPrincipal principal)
 Sets the current principal. More...
 

Properties

virtual HttpContext HttpContext [get]
 Gets the current HttpContext instance. More...
 
bool IsValid [get]
 Gets a value indicating whether this context manager is valid for use in the current environment. More...
 
bool IsStatefulContext [get]
 Gets a value indicating whether the context manager is stateful. More...
 
virtual ApplicationContextApplicationContext [getset]
 Gets or sets a reference to the current ApplicationContext. More...
 
- Properties inherited from Csla.Core.IContextManager
bool IsStatefulContext [get]
 Gets a value indicating whether this
context manager is used in a stateful context (e.g. More...
 
bool IsValid [get]
 Gets a value indicating whether this context manager is valid for use in the current environment. More...
 
ApplicationContext ApplicationContext [getset]
 Gets or sets a reference to the current ApplicationContext. More...
 

Detailed Description

Application context manager that uses HttpContextAccessor when resolving HttpContext to store context values.

Definition at line 20 of file ApplicationContextManagerHttpContext.cs.

Constructor & Destructor Documentation

◆ ApplicationContextManagerHttpContext()

Csla.AspNetCore.ApplicationContextManagerHttpContext.ApplicationContextManagerHttpContext ( IHttpContextAccessor  httpContextAccessor,
IRuntimeInfo  runtimeInfo 
)

Creates an instance of the object, initializing it with the required IServiceProvider.

Parameters
httpContextAccessorHttpContext accessor
runtimeInfo

Definition at line 55 of file ApplicationContextManagerHttpContext.cs.

Member Function Documentation

◆ GetClientContext()

ContextDictionary Csla.AspNetCore.ApplicationContextManagerHttpContext.GetClientContext ( ApplicationContext.ExecutionLocations  executionLocation)

Gets the client context.

Parameters
executionLocation

Implements Csla.Core.IContextManager.

Definition at line 143 of file ApplicationContextManagerHttpContext.cs.

◆ GetLocalContext()

ContextDictionary Csla.AspNetCore.ApplicationContextManagerHttpContext.GetLocalContext ( )

Gets the local context.

Implements Csla.Core.IContextManager.

Definition at line 125 of file ApplicationContextManagerHttpContext.cs.

◆ GetUser()

System.Security.Principal.IPrincipal Csla.AspNetCore.ApplicationContextManagerHttpContext.GetUser ( )

Gets the current principal.

Implements Csla.Core.IContextManager.

Definition at line 102 of file ApplicationContextManagerHttpContext.cs.

◆ SetClientContext()

void Csla.AspNetCore.ApplicationContextManagerHttpContext.SetClientContext ( ContextDictionary  clientContext,
ApplicationContext.ExecutionLocations  executionLocation 
)

Sets the client context.

Parameters
clientContextClient context.
executionLocation

Implements Csla.Core.IContextManager.

Definition at line 153 of file ApplicationContextManagerHttpContext.cs.

◆ SetLocalContext()

void Csla.AspNetCore.ApplicationContextManagerHttpContext.SetLocalContext ( ContextDictionary  localContext)

Sets the local context.

Parameters
localContextLocal context.

Implements Csla.Core.IContextManager.

Definition at line 134 of file ApplicationContextManagerHttpContext.cs.

◆ SetUser()

void Csla.AspNetCore.ApplicationContextManagerHttpContext.SetUser ( System.Security.Principal.IPrincipal  principal)

Sets the current principal.

Parameters
principalPrincipal object.

Definition at line 117 of file ApplicationContextManagerHttpContext.cs.

Property Documentation

◆ ApplicationContext

virtual ApplicationContext? Csla.AspNetCore.ApplicationContextManagerHttpContext.ApplicationContext
getset

Gets or sets a reference to the current ApplicationContext.

Definition at line 163 of file ApplicationContextManagerHttpContext.cs.

◆ HttpContext

virtual HttpContext Csla.AspNetCore.ApplicationContextManagerHttpContext.HttpContext
getprotected

Gets the current HttpContext instance.

Definition at line 67 of file ApplicationContextManagerHttpContext.cs.

◆ IsStatefulContext

bool Csla.AspNetCore.ApplicationContextManagerHttpContext.IsStatefulContext
get

Gets a value indicating whether the context manager is stateful.

Definition at line 97 of file ApplicationContextManagerHttpContext.cs.

◆ IsValid

bool Csla.AspNetCore.ApplicationContextManagerHttpContext.IsValid
get

Gets a value indicating whether this context manager is valid for use in the current environment.

Definition at line 74 of file ApplicationContextManagerHttpContext.cs.