CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Core.ApplicationContextManagerStatic Class Reference

Context manager for the user property and local/client/global context dictionaries that uses static fields to maintain per-thread context. More...

Inheritance diagram for Csla.Core.ApplicationContextManagerStatic:
Csla.Core.IContextManager

Public Member Functions

ContextDictionary GetClientContext ()
 Gets the client context dictionary. More...
 
IServiceProvider GetDefaultServiceProvider ()
 Gets the default IServiceProvider More...
 
ContextDictionary GetGlobalContext ()
 Gets the global context dictionary. More...
 
ContextDictionary GetLocalContext ()
 Gets the local context dictionary. More...
 
IPrincipal GetUser ()
 Gets the current user principal. More...
 
void SetClientContext (ContextDictionary clientContext)
 Sets the client context dictionary. More...
 
void SetDefaultServiceProvider (IServiceProvider serviceProvider)
 Sets the default IServiceProvider More...
 
void SetGlobalContext (ContextDictionary globalContext)
 Sets the global context dictionary. More...
 
void SetLocalContext (ContextDictionary localContext)
 Sets the local context dictionary. More...
 
IServiceProvider GetServiceProvider ()
 Gets the service provider for current scope More...
 
void SetServiceProvider (IServiceProvider scope)
 Sets the service provider for current scope More...
 
void SetUser (IPrincipal principal)
 Sets the current user principal. More...
 

Properties

bool IsValid [get]
 Returns a value indicating whether the context is valid. More...
 
- Properties inherited from Csla.Core.IContextManager
bool IsValid [get]
 Gets a value indicating whether this context manager is valid for use in the current environment. More...
 

Detailed Description

Context manager for the user property and local/client/global context dictionaries that uses static fields to maintain per-thread context.

Definition at line 20 of file ApplicationContextManagerStatic.cs.

Member Function Documentation

◆ GetClientContext()

ContextDictionary Csla.Core.ApplicationContextManagerStatic.GetClientContext ( )

Gets the client context dictionary.

Implements Csla.Core.IContextManager.

Definition at line 37 of file ApplicationContextManagerStatic.cs.

◆ GetDefaultServiceProvider()

IServiceProvider Csla.Core.ApplicationContextManagerStatic.GetDefaultServiceProvider ( )

Gets the default IServiceProvider

Implements Csla.Core.IContextManager.

Definition at line 45 of file ApplicationContextManagerStatic.cs.

◆ GetGlobalContext()

ContextDictionary Csla.Core.ApplicationContextManagerStatic.GetGlobalContext ( )

Gets the global context dictionary.

Implements Csla.Core.IContextManager.

Definition at line 53 of file ApplicationContextManagerStatic.cs.

◆ GetLocalContext()

ContextDictionary Csla.Core.ApplicationContextManagerStatic.GetLocalContext ( )

Gets the local context dictionary.

Implements Csla.Core.IContextManager.

Definition at line 61 of file ApplicationContextManagerStatic.cs.

◆ GetServiceProvider()

IServiceProvider Csla.Core.ApplicationContextManagerStatic.GetServiceProvider ( )

Gets the service provider for current scope

Implements Csla.Core.IContextManager.

Definition at line 114 of file ApplicationContextManagerStatic.cs.

◆ GetUser()

IPrincipal Csla.Core.ApplicationContextManagerStatic.GetUser ( )

Gets the current user principal.

Returns
The current user principal

Implements Csla.Core.IContextManager.

Definition at line 70 of file ApplicationContextManagerStatic.cs.

◆ SetClientContext()

void Csla.Core.ApplicationContextManagerStatic.SetClientContext ( ContextDictionary  clientContext)

Sets the client context dictionary.

Parameters
clientContextContext dictionary

Implements Csla.Core.IContextManager.

Definition at line 79 of file ApplicationContextManagerStatic.cs.

◆ SetDefaultServiceProvider()

void Csla.Core.ApplicationContextManagerStatic.SetDefaultServiceProvider ( IServiceProvider  serviceProvider)

Sets the default IServiceProvider

Parameters
serviceProviderIServiceProvider instance

Implements Csla.Core.IContextManager.

Definition at line 88 of file ApplicationContextManagerStatic.cs.

◆ SetGlobalContext()

void Csla.Core.ApplicationContextManagerStatic.SetGlobalContext ( ContextDictionary  globalContext)

Sets the global context dictionary.

Parameters
globalContextContext dictionary

Implements Csla.Core.IContextManager.

Definition at line 97 of file ApplicationContextManagerStatic.cs.

◆ SetLocalContext()

void Csla.Core.ApplicationContextManagerStatic.SetLocalContext ( ContextDictionary  localContext)

Sets the local context dictionary.

Parameters
localContextContext dictionary

Implements Csla.Core.IContextManager.

Definition at line 106 of file ApplicationContextManagerStatic.cs.

◆ SetServiceProvider()

void Csla.Core.ApplicationContextManagerStatic.SetServiceProvider ( IServiceProvider  scope)

Sets the service provider for current scope

Parameters
scopeIServiceProvider instance

Implements Csla.Core.IContextManager.

Definition at line 123 of file ApplicationContextManagerStatic.cs.

◆ SetUser()

void Csla.Core.ApplicationContextManagerStatic.SetUser ( IPrincipal  principal)

Sets the current user principal.

Parameters
principalUser principal value

Implements Csla.Core.IContextManager.

Definition at line 132 of file ApplicationContextManagerStatic.cs.

Property Documentation

◆ IsValid

bool Csla.Core.ApplicationContextManagerStatic.IsValid
get

Returns a value indicating whether the context is valid.

Definition at line 25 of file ApplicationContextManagerStatic.cs.