12using System.Security.Claims;
23 private const string _localContextName =
"Csla.LocalContext";
24 private const string _clientContextName =
"Csla.ClientContext";
33 protected Blazor.ActiveCircuitState ActiveCircuitState {
get;
private set; }
45 this.runtimeInfo = runtimeInfo;
46 ActiveCircuitState = activeCircuitState;
58 this.runtimeInfo = runtimeInfo;
81 if (runtimeInfo.LocalProxyNewScopeExists)
85 if (ActiveCircuitState.CircuitExists)
102 public System.Security.Principal.IPrincipal
GetUser()
117 public void SetUser(System.Security.Principal.IPrincipal principal)
136 HttpContext.Items[_localContextName] = localContext;
155 HttpContext.Items[_clientContextName] = clientContext;
158 private const string _applicationContextName =
"Csla.ApplicationContext";
171 HttpContext.Items[_applicationContextName] = value;
Provides consistent context information between the client and server DataPortal objects.
ExecutionLocations
Enum representing the locations code can execute.
Application context manager that uses HttpContextAccessor when resolving HttpContext to store context...
void SetClientContext(ContextDictionary clientContext, ApplicationContext.ExecutionLocations executionLocation)
Sets the client context.
System.Security.Principal.IPrincipal GetUser()
Gets the current principal.
ApplicationContextManagerHttpContext(IHttpContextAccessor httpContextAccessor, IRuntimeInfo runtimeInfo)
Creates an instance of the object, initializing it with the required IServiceProvider.
virtual HttpContext HttpContext
Gets the current HttpContext instance.
void SetUser(System.Security.Principal.IPrincipal principal)
Sets the current principal.
bool IsStatefulContext
Gets a value indicating whether the context manager is stateful.
void SetLocalContext(ContextDictionary localContext)
Sets the local context.
ContextDictionary GetLocalContext()
Gets the local context.
bool IsValid
Gets a value indicating whether this context manager is valid for use in the current environment.
ContextDictionary GetClientContext(ApplicationContext.ExecutionLocations executionLocation)
Gets the client context.
Dictionary type that is serializable with the SerializationFormatterFactory.GetFormatter().
ClaimsPrincipal subclass that supports serialization by SerializationFormatterFactory....
Defines the interface for an application context manager type.
Information about the current runtime environment.