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

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

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

Public Member Functions

 ApplicationContextManager (IServiceProvider serviceProvider)
 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 ()
 Gets the client context. More...
 
void SetClientContext (ContextDictionary clientContext)
 Sets the client context. More...
 
ContextDictionary GetGlobalContext ()
 Gets the global context. More...
 
void SetGlobalContext (ContextDictionary globalContext)
 Sets the global context. More...
 
IServiceProvider GetDefaultServiceProvider ()
 Gets the default IServiceProvider More...
 
void SetDefaultServiceProvider (IServiceProvider serviceProvider)
 Sets the default IServiceProvider More...
 
IServiceProvider GetServiceProvider ()
 Gets the service provider for current scope More...
 
void SetServiceProvider (IServiceProvider scope)
 Sets the service provider for current scope 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...
 
- Properties inherited from Csla.Core.IContextManager
bool IsValid [get]
 Gets a value indicating whether this context manager is valid for use in the current environment. More...
 

Detailed Description

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

Definition at line 21 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

Constructor & Destructor Documentation

◆ ApplicationContextManager()

Csla.AspNetCore.ApplicationContextManager.ApplicationContextManager ( IServiceProvider  serviceProvider)

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

Parameters
serviceProviderASP.NET Core IServiceProvider

Definition at line 35 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

Member Function Documentation

◆ GetClientContext()

ContextDictionary Csla.AspNetCore.ApplicationContextManager.GetClientContext ( )

Gets the client context.

Implements Csla.Core.IContextManager.

Definition at line 113 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ GetDefaultServiceProvider()

IServiceProvider Csla.AspNetCore.ApplicationContextManager.GetDefaultServiceProvider ( )

Gets the default IServiceProvider

Implements Csla.Core.IContextManager.

Definition at line 147 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ GetGlobalContext()

ContextDictionary Csla.AspNetCore.ApplicationContextManager.GetGlobalContext ( )

Gets the global context.

Implements Csla.Core.IContextManager.

Definition at line 130 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ GetLocalContext()

ContextDictionary Csla.AspNetCore.ApplicationContextManager.GetLocalContext ( )

Gets the local context.

Implements Csla.Core.IContextManager.

Definition at line 96 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ GetServiceProvider()

IServiceProvider Csla.AspNetCore.ApplicationContextManager.GetServiceProvider ( )

Gets the service provider for current scope

Returns

Implements Csla.Core.IContextManager.

Definition at line 168 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ GetUser()

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

Gets the current principal.

Implements Csla.Core.IContextManager.

Definition at line 73 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ SetClientContext()

void Csla.AspNetCore.ApplicationContextManager.SetClientContext ( ContextDictionary  clientContext)

Sets the client context.

Parameters
clientContextClient context.

Implements Csla.Core.IContextManager.

Definition at line 122 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ SetDefaultServiceProvider()

void Csla.AspNetCore.ApplicationContextManager.SetDefaultServiceProvider ( IServiceProvider  serviceProvider)

Sets the default IServiceProvider

Parameters
serviceProviderIServiceProvider instance

Implements Csla.Core.IContextManager.

Definition at line 158 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ SetGlobalContext()

void Csla.AspNetCore.ApplicationContextManager.SetGlobalContext ( ContextDictionary  globalContext)

Sets the global context.

Parameters
globalContextGlobal context.

Implements Csla.Core.IContextManager.

Definition at line 139 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ SetLocalContext()

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

Sets the local context.

Parameters
localContextLocal context.

Implements Csla.Core.IContextManager.

Definition at line 105 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ SetServiceProvider()

void Csla.AspNetCore.ApplicationContextManager.SetServiceProvider ( IServiceProvider  scope)

Sets the service provider for current scope

Parameters
scopeIServiceProvider instance

Implements Csla.Core.IContextManager.

Definition at line 177 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ SetUser()

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

Sets the current principal.

Parameters
principalPrincipal object.

Definition at line 88 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

Property Documentation

◆ HttpContext

virtual HttpContext Csla.AspNetCore.ApplicationContextManager.HttpContext
getprotected

Gets the current HttpContext instance.

Definition at line 43 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.

◆ IsValid

bool Csla.AspNetCore.ApplicationContextManager.IsValid
get

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

Definition at line 65 of file Csla.AspNetCore.Shared/ApplicationContextManager.cs.