9using System.Security.Principal;
10using System.Security.Claims;
35 private static IPrincipal currentPrincipal =
new ClaimsPrincipal();
36 private static IServiceProvider currentDefaultServiceProvider;
37 private static IServiceProvider currentServiceProvider;
45 return currentClientContext;
53 return currentDefaultServiceProvider;
61 return currentLocalContext;
70 return currentPrincipal;
80 currentClientContext = clientContext;
89 currentDefaultServiceProvider = serviceProvider;
98 currentLocalContext = localContext;
115 currentServiceProvider = scope;
124 currentPrincipal = principal;
Provides consistent context information between the client and server DataPortal objects.
ExecutionLocations
Enum representing the locations code can execute.
Context manager for the user property and local/client/global context dictionaries that uses static f...
void SetClientContext(ContextDictionary clientContext, ApplicationContext.ExecutionLocations executionLocation)
Sets the client context dictionary.
void SetUser(IPrincipal principal)
Sets the current user principal.
IServiceProvider GetDefaultServiceProvider()
Gets the default IServiceProvider
ContextDictionary GetLocalContext()
Gets the local context dictionary.
bool IsStatefulContext
Gets a value indicating whether the context manager is stateful.
void SetLocalContext(ContextDictionary localContext)
Sets the local 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(ApplicationContext.ExecutionLocations executionLocation)
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.