Application context manager that uses HttpContextAccessor when resolving HttpContext to store context values. More...
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... | |
Application context manager that uses HttpContextAccessor when resolving HttpContext to store context values.
Definition at line 21 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
Csla.Blazor.WebAssembly.ApplicationContextManager.ApplicationContextManager | ( | AuthenticationStateProvider | authenticationStateProvider | ) |
Creates an instance of the object, initializing it with the required IServiceProvider.
authenticationStateProvider | AuthenticationStateProvider service |
Definition at line 44 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
void Csla.Blazor.WebAssembly.ApplicationContextManager.Dispose | ( | ) |
Dispose this object's resources.
Definition at line 162 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
|
protectedvirtual |
Dispose this object's resources.
disposing |
Definition at line 147 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
ContextDictionary Csla.Blazor.WebAssembly.ApplicationContextManager.GetClientContext | ( | ApplicationContext.ExecutionLocations | executionLocation | ) |
Gets the client context.
executionLocation |
Implements Csla.Core.IContextManager.
Definition at line 126 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
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.
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.
void Csla.Blazor.WebAssembly.ApplicationContextManager.SetClientContext | ( | ContextDictionary | clientContext, |
ApplicationContext.ExecutionLocations | executionLocation | ||
) |
Sets the client context.
clientContext | Client context. |
executionLocation |
Implements Csla.Core.IContextManager.
Definition at line 138 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
void Csla.Blazor.WebAssembly.ApplicationContextManager.SetLocalContext | ( | ContextDictionary | localContext | ) |
Sets the local context.
localContext | Local context. |
Implements Csla.Core.IContextManager.
Definition at line 117 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
|
virtual |
Sets the current principal ONLY IN APPLICATIONCONTEXT.
To set the value correctly, use your specific ApplicatonContextStateProvider implementation.
principal | Principal object. |
Implements Csla.Core.IContextManager.
Definition at line 98 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
|
getset |
Gets or sets a reference to the current ApplicationContext.
Definition at line 37 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
|
getprotected |
Gets the current HttpContext instance.
Definition at line 32 of file Csla.Blazor.WebAssembly/ApplicationContextManager.cs.
|
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.
|
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.