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.ApplicationContextManagerTls Class Reference

Context manager for the user property and local/client/global context dictionaries that uses thread local storage (TLS) to maintain per-thread context. More...

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

Public Member Functions

virtual IPrincipal GetUser ()
 Gets the current user principal. More...
 
virtual void SetUser (IPrincipal principal)
 Sets the current user principal. More...
 
ContextDictionary GetLocalContext ()
 Gets the local context dictionary. More...
 
void SetLocalContext (ContextDictionary localContext)
 Sets the local context dictionary. More...
 
ContextDictionary GetClientContext ()
 Gets the client context dictionary. More...
 
void SetClientContext (ContextDictionary clientContext)
 Sets the client context dictionary. More...
 
ContextDictionary GetGlobalContext ()
 Gets the global context dictionary. More...
 
void SetGlobalContext (ContextDictionary globalContext)
 Sets the global context dictionary. More...
 
IServiceProvider GetDefaultServiceProvider ()
 Gets the default IServiceProvider More...
 
void SetDefaultServiceProvider (IServiceProvider serviceProvider)
 Sets the default IServiceProvider More...
 
IServiceProvider GetServiceProvider ()
 Gets the service provider for current scope More...
 
void SetServiceProvider (IServiceProvider scope)
 Sets the service provider for current scope 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 thread local storage (TLS) to maintain per-thread context.

Definition at line 20 of file ApplicationContextManagerTls.cs.

Member Function Documentation

◆ GetClientContext()

ContextDictionary Csla.Core.ApplicationContextManagerTls.GetClientContext ( )

Gets the client context dictionary.

Implements Csla.Core.IContextManager.

Definition at line 80 of file ApplicationContextManagerTls.cs.

◆ GetDefaultServiceProvider()

IServiceProvider Csla.Core.ApplicationContextManagerTls.GetDefaultServiceProvider ( )

Gets the default IServiceProvider

Implements Csla.Core.IContextManager.

Definition at line 134 of file ApplicationContextManagerTls.cs.

◆ GetGlobalContext()

ContextDictionary Csla.Core.ApplicationContextManagerTls.GetGlobalContext ( )

Gets the global context dictionary.

Implements Csla.Core.IContextManager.

Definition at line 113 of file ApplicationContextManagerTls.cs.

◆ GetLocalContext()

ContextDictionary Csla.Core.ApplicationContextManagerTls.GetLocalContext ( )

Gets the local context dictionary.

Implements Csla.Core.IContextManager.

Definition at line 61 of file ApplicationContextManagerTls.cs.

◆ GetServiceProvider()

IServiceProvider Csla.Core.ApplicationContextManagerTls.GetServiceProvider ( )

Gets the service provider for current scope

Returns

Implements Csla.Core.IContextManager.

Definition at line 153 of file ApplicationContextManagerTls.cs.

◆ GetUser()

virtual IPrincipal Csla.Core.ApplicationContextManagerTls.GetUser ( )
virtual

Gets the current user principal.

Returns
The current user principal

Implements Csla.Core.IContextManager.

Definition at line 38 of file ApplicationContextManagerTls.cs.

◆ SetClientContext()

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

Sets the client context dictionary.

Parameters
clientContextContext dictionary

Implements Csla.Core.IContextManager.

Definition at line 97 of file ApplicationContextManagerTls.cs.

◆ SetDefaultServiceProvider()

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

Sets the default IServiceProvider

Parameters
serviceProviderIServiceProvider instance

Implements Csla.Core.IContextManager.

Definition at line 143 of file ApplicationContextManagerTls.cs.

◆ SetGlobalContext()

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

Sets the global context dictionary.

Parameters
globalContextContext dictionary

Implements Csla.Core.IContextManager.

Definition at line 123 of file ApplicationContextManagerTls.cs.

◆ SetLocalContext()

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

Sets the local context dictionary.

Parameters
localContextContext dictionary

Implements Csla.Core.IContextManager.

Definition at line 71 of file ApplicationContextManagerTls.cs.

◆ SetServiceProvider()

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

Sets the service provider for current scope

Parameters
scopeIServiceProvider instance

Implements Csla.Core.IContextManager.

Definition at line 164 of file ApplicationContextManagerTls.cs.

◆ SetUser()

virtual void Csla.Core.ApplicationContextManagerTls.SetUser ( IPrincipal  principal)
virtual

Sets the current user principal.

Parameters
principalUser principal value

Implements Csla.Core.IContextManager.

Definition at line 53 of file ApplicationContextManagerTls.cs.

Property Documentation

◆ IsValid

bool Csla.Core.ApplicationContextManagerTls.IsValid
get

Returns a value indicating whether the context is valid.

Definition at line 29 of file ApplicationContextManagerTls.cs.