9using System.Security.Principal;
10using System.Security.Claims;
30 private static IPrincipal currentPrincipal =
new ClaimsPrincipal();
31 private static IServiceProvider currentDefaultServiceProvider;
32 private static IServiceProvider currentServiceProvider;
39 return currentClientContext;
47 return currentDefaultServiceProvider;
55 return currentGlobalContext;
63 return currentLocalContext;
72 return currentPrincipal;
81 currentClientContext = clientContext;
90 currentDefaultServiceProvider = serviceProvider;
99 currentGlobalContext = globalContext;
108 currentLocalContext = localContext;
125 currentServiceProvider = scope;
134 currentPrincipal = principal;
Context manager for the user property and local/client/global context dictionaries that uses static f...
void SetUser(IPrincipal principal)
Sets the current user principal.
void SetGlobalContext(ContextDictionary globalContext)
Sets the global context dictionary.
void SetClientContext(ContextDictionary clientContext)
Sets the client context dictionary.
IServiceProvider GetDefaultServiceProvider()
Gets the default IServiceProvider
ContextDictionary GetLocalContext()
Gets the local context dictionary.
void SetLocalContext(ContextDictionary localContext)
Sets the local context dictionary.
ContextDictionary GetGlobalContext()
Gets the global context dictionary.
IPrincipal GetUser()
Gets the current user principal.
void SetServiceProvider(IServiceProvider scope)
Sets the service provider for current scope
IServiceProvider GetServiceProvider()
Gets the service provider for current scope
bool IsValid
Returns a value indicating whether the context is valid.
ContextDictionary GetClientContext()
Gets the client context dictionary.
void SetDefaultServiceProvider(IServiceProvider serviceProvider)
Sets the default IServiceProvider
Dictionary type that is serializable with the SerializationFormatterFactory.GetFormatter().
Defines the interface for an application context manager type.