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.
ContextParams.cs
Go to the documentation of this file.
1
//-----------------------------------------------------------------------
2
// <copyright file="ContextParams.cs" company="Marimer LLC">
3
// Copyright (c) Marimer LLC. All rights reserved.
4
// Website: https://cslanet.com
5
// </copyright>
6
// <summary>Implementation of a lock that waits while</summary>
7
//----------------------------------------------------------------------
8
using
System.Globalization;
9
using
System.Security.Principal;
10
using
System.Threading;
11
using
Csla
.
Core
;
12
13
namespace
Csla.Threading
14
{
18
internal
class
ContextParams
19
{
20
public
IPrincipal User {
get
;
private
set
; }
21
public
Csla
.
Core
.
ContextDictionary
ClientContext {
get
;
private
set
; }
22
public
Csla
.
Core
.
ContextDictionary
GlobalContext {
get
;
private
set
; }
23
public
CultureInfo UICulture {
get
;
private
set
; }
24
public
CultureInfo Culture {
get
;
private
set
; }
25
26
public
ContextParams()
27
{
28
this.User =
Csla
.
ApplicationContext
.User;
29
this.ClientContext =
Csla
.
ApplicationContext
.ClientContext;
30
#pragma warning disable CS0618
// Type or member is obsolete
31
this.GlobalContext =
Csla
.
ApplicationContext
.GlobalContext;
32
#pragma warning restore CS0618
// Type or member is obsolete
33
this.Culture = System.Globalization.CultureInfo.CurrentCulture;
34
this.UICulture = System.Globalization.CultureInfo.CurrentUICulture;
35
}
36
37
internal
void
SetThreadContext()
38
{
39
Csla
.
ApplicationContext
.User = User;
40
Csla
.
ApplicationContext
.SetContext(ClientContext, GlobalContext);
41
Thread.CurrentThread.CurrentUICulture = UICulture;
42
Thread.CurrentThread.CurrentCulture = Culture;
43
}
44
}
45
}
Csla.ApplicationContext
Definition:
ApplicationContext.cs:22
Csla.Core.ContextDictionary
Dictionary type that is serializable with the SerializationFormatterFactory.GetFormatter().
Definition:
ContextDictionary.cs:20
Csla.Core
Definition:
AddedNewEventArgs.cs:11
Csla.Threading
Definition:
AsyncManualResetEvent.cs:15
Csla
Definition:
Csla.AspNetCore.Shared/ApplicationContextManager.cs:16
Generated by
1.9.2