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.Blazor.WebAssembly.ApplicationContextManager Class Reference

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

Inheritance diagram for Csla.Blazor.WebAssembly.ApplicationContextManager:
Csla.Core.IContextManager

Public Member Functions

 ApplicationContextManager (AuthenticationStateProvider authenticationStateProvider)
 Creates an instance of the object, initializing it with the required IServiceProvider. More...
 
IPrincipal GetUser ()
 Gets the current principal. More...
 
virtual void SetUser (IPrincipal principal)
 Sets the current principal ONLY IN APPLICATIONCONTEXT. 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...
 
void Dispose ()
 Dispose this object's resources. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Dispose this object's resources. More...
 

Properties

AuthenticationStateProvider AuthenticationStateProvider [get]
 Gets the current HttpContext instance. More...
 
ApplicationContext ApplicationContext [getset]
 Gets or sets a reference to the current ApplicationContext. 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 current runtime is stateful (e.g. 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 21 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

Constructor & Destructor Documentation

◆ ApplicationContextManager()

Csla.Blazor.WebAssembly.ApplicationContextManager.ApplicationContextManager ( AuthenticationStateProvider  authenticationStateProvider)

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

Parameters
authenticationStateProviderAuthenticationStateProvider service

Definition at line 44 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

Member Function Documentation

◆ Dispose() [1/2]

void Csla.Blazor.WebAssembly.ApplicationContextManager.Dispose ( )

Dispose this object's resources.

Definition at line 162 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ Dispose() [2/2]

virtual void Csla.Blazor.WebAssembly.ApplicationContextManager.Dispose ( bool  disposing)
protectedvirtual

Dispose this object's resources.

Parameters
disposing

Definition at line 147 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ GetClientContext()

ContextDictionary Csla.Blazor.WebAssembly.ApplicationContextManager.GetClientContext ( ApplicationContext.ExecutionLocations  executionLocation)

Gets the client context.

Parameters
executionLocation

Implements Csla.Core.IContextManager.

Definition at line 126 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ GetLocalContext()

ContextDictionary Csla.Blazor.WebAssembly.ApplicationContextManager.GetLocalContext ( )

Gets the local context.

Implements Csla.Core.IContextManager.

Definition at line 106 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ GetUser()

IPrincipal Csla.Blazor.WebAssembly.ApplicationContextManager.GetUser ( )

Gets the current principal.

Implements Csla.Core.IContextManager.

Definition at line 87 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ SetClientContext()

void Csla.Blazor.WebAssembly.ApplicationContextManager.SetClientContext ( ContextDictionary  clientContext,
ApplicationContext.ExecutionLocations  executionLocation 
)

Sets the client context.

Parameters
clientContextClient context.
executionLocation

Implements Csla.Core.IContextManager.

Definition at line 138 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ SetLocalContext()

void Csla.Blazor.WebAssembly.ApplicationContextManager.SetLocalContext ( ContextDictionary  localContext)

Sets the local context.

Parameters
localContextLocal context.

Implements Csla.Core.IContextManager.

Definition at line 117 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ SetUser()

virtual void Csla.Blazor.WebAssembly.ApplicationContextManager.SetUser ( IPrincipal  principal)
virtual

Sets the current principal ONLY IN APPLICATIONCONTEXT.

To set the value correctly, use your specific ApplicatonContextStateProvider implementation.

Parameters
principalPrincipal object.

Implements Csla.Core.IContextManager.

Definition at line 98 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

Property Documentation

◆ ApplicationContext

ApplicationContext Csla.Blazor.WebAssembly.ApplicationContextManager.ApplicationContext
getset

Gets or sets a reference to the current ApplicationContext.

Definition at line 37 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ AuthenticationStateProvider

AuthenticationStateProvider Csla.Blazor.WebAssembly.ApplicationContextManager.AuthenticationStateProvider
getprotected

Gets the current HttpContext instance.

Definition at line 32 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ IsStatefulContext

bool Csla.Blazor.WebAssembly.ApplicationContextManager.IsStatefulContext
get

Gets a value indicating whether the current runtime is stateful (e.g.

WPF, Blazor, etc.)

Definition at line 82 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.

◆ IsValid

bool Csla.Blazor.WebAssembly.ApplicationContextManager.IsValid
get

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

Definition at line 73 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.