Provides consistent context information between the client and server DataPortal objects.
More...
|
| IContextManager | ContextManager [get] |
| | Gets the context manager responsible for storing user and context information for the application.
|
| ClaimsPrincipal | Principal [get, set] |
| | Get or set the current ClaimsPrincipal object representing the user's identity.
|
| IPrincipal | User [get, set] |
| | Get or set the current IPrincipal object representing the user's identity.
|
| IContextDictionary | LocalContext [get] |
| | Returns the application-specific context data that is local to the current AppDomain.
|
| IContextDictionary | ClientContext [get] |
| | Returns the application-specific context data provided by the client.
|
| bool | IsOffline [get, set] |
| | Gets or sets a value indicating whether the app should be considered "offline".
|
| static bool | UseReflectionFallback = false [get, set] |
| | Gets or sets a value indicating whether CSLA should fallback to using reflection instead of System.Linq.Expressions (true, default).
|
| PropertyChangedModes | PropertyChangedMode [get] |
| | Gets or sets a value specifying how CSLA .NET should raise PropertyChanged events.
|
| ExecutionLocations | ExecutionLocation [get] |
| | Returns a value indicating whether the application code is currently executing on the client or server.
|
| string | RuleSet [get, set] |
| | Gets or sets the RuleSet name to use for HasPermission calls.
|
| LogicalExecutionLocations | LogicalExecutionLocation [get] |
| | Return Logical Execution Location - Client or Server This is applicable to Local mode as well.
|
| bool | IsAStatefulContextManager [get] |
| | Gets a value indicating whether the current context manager is used in a stateful context (e.g. WPF, Blazor, etc.).
|
Provides consistent context information between the client and server DataPortal objects.
◆ ExecutionLocations
Enum representing the locations code can execute.
| Enumerator |
|---|
| Client | The code is executing on the client.
|
| Server | The code is executing on the application server.
|
◆ LogicalExecutionLocations
Enum representing the logical execution location The setting is set to server when server is executing a CRUD operation, otherwise the setting is always client.
| Enumerator |
|---|
| Client | The code is executing on the client.
|
| Server | The code is executing on the server. This includes Local mode execution.
|
◆ PropertyChangedModes
Enum representing the way in which CSLA .NET should raise PropertyChanged events.
| Enumerator |
|---|
| Windows | Raise PropertyChanged events as required by Windows Forms data binding.
|
| Xaml | Raise PropertyChanged events as required by XAML data binding in WPF.
|
◆ ApplicationContext()
| Csla.ApplicationContext.ApplicationContext |
( |
ApplicationContextAccessor | applicationContextAccessor | ) |
|
|
inline |
Creates a new instance of the type.
- Parameters
-
| applicationContextAccessor | |
◆ Clear()
| void Csla.ApplicationContext.Clear |
( |
| ) |
|
|
inline |
Clears all context collections.
◆ CreateInstance()
| object Csla.ApplicationContext.CreateInstance |
( |
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type | objectType, |
|
|
params object[] | parameters ) |
|
inline |
Creates an object using Activator.
- Parameters
-
| objectType | Type of object to create |
| parameters | Parameters for constructor |
◆ CreateInstance<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T >()
Creates an object using Activator.
- Template Parameters
-
| T | Type of object to create. |
- Parameters
-
| parameters | Parameters for constructor |
◆ CreateInstanceDI()
| object Csla.ApplicationContext.CreateInstanceDI |
( |
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type | objectType, |
|
|
params object[] | parameters ) |
|
inline |
Creates an object using the IDataPortalActivator.
- Parameters
-
| objectType | Type of object to create |
| parameters | Manually passed in parameters for constructor |
◆ CreateInstanceDI<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]T >()
Creates an object using the IDataPortalActivator.
- Template Parameters
-
| T | Type of object to create. |
- Parameters
-
| parameters | Parameters for constructor |
◆ GetRequiredService()
| object Csla.ApplicationContext.GetRequiredService |
( |
Type | serviceType | ) |
|
|
inline |
Attempts to get service via DI using ServiceProviderServiceExtensions.GetRequiredService. Throws exception if service not properly registered with DI.
- Parameters
-
| serviceType | Type of service/object to create. |
◆ GetRequiredService< T >()
Attempts to get service via DI using ServiceProviderServiceExtensions.GetRequiredService. Throws exception if service not properly registered with DI.
- Template Parameters
-
| T | Type of service/object to create. |
◆ DefaultRuleSet
| const string Csla.ApplicationContext.DefaultRuleSet = "default" |
|
static |
The default RuleSet name.
◆ ClientContext
Returns the application-specific context data provided by the client.
The return value is a HybridDictionary. If one does not already exist, and empty one is created and returned.
Note that data in this context is transferred from the client to the server. No data is transferred from the server to the client.
This property is thread safe in a Windows client setting and on an application server. It is not guaranteed to be thread safe within the context of an ASP.NET client setting (i.e. in your ASP.NET UI).
◆ ContextManager
Gets the context manager responsible for storing user and context information for the application.
◆ ExecutionLocation
Initial value:=
ExecutionLocations
Enum representing the locations code can execute.
Definition ApplicationContext.cs:191
Returns a value indicating whether the application code is currently executing on the client or server.
◆ IsAStatefulContextManager
| bool Csla.ApplicationContext.IsAStatefulContextManager |
|
get |
Gets a value indicating whether the current context manager is used in a stateful context (e.g. WPF, Blazor, etc.).
◆ IsOffline
| bool Csla.ApplicationContext.IsOffline |
|
getset |
Gets or sets a value indicating whether the app should be considered "offline".
If this value is true then the client-side data portal will direct all calls to the local data portal. No calls will flow to remote data portal endpoints.
◆ LocalContext
Returns the application-specific context data that is local to the current AppDomain.
The return value is a HybridDictionary. If one does not already exist, and empty one is created and returned.
Note that data in this context is NOT transferred to and from the client and server.
◆ LogicalExecutionLocation
Return Logical Execution Location - Client or Server This is applicable to Local mode as well.
◆ Principal
| ClaimsPrincipal Csla.ApplicationContext.Principal |
|
getset |
Get or set the current ClaimsPrincipal object representing the user's identity.
◆ PropertyChangedMode
Gets or sets a value specifying how CSLA .NET should raise PropertyChanged events.
◆ RuleSet
| string Csla.ApplicationContext.RuleSet |
|
getset |
Gets or sets the RuleSet name to use for HasPermission calls.
The rule set.
◆ User
| IPrincipal Csla.ApplicationContext.User |
|
getset |
Get or set the current IPrincipal object representing the user's identity.
This is discussed in Chapter 5. When running under IIS the HttpContext.Current.User value is used, otherwise the current Thread.CurrentPrincipal value is used.
◆ UseReflectionFallback
| bool Csla.ApplicationContext.UseReflectionFallback = false |
|
staticgetset |
Gets or sets a value indicating whether CSLA should fallback to using reflection instead of System.Linq.Expressions (true, default).
The documentation for this class was generated from the following file: