9using System.Security.Principal;
10using System.Collections.Specialized;
22 private IPrincipal _principal;
23 private bool _remotePortal;
24 private string _clientCulture;
25 private string _clientUICulture;
39 get {
return _principal; }
49 get {
return _remotePortal; }
58 get {
return _clientCulture; }
67 get {
return _clientUICulture; }
71 get {
return _clientContext; }
76 get {
return _globalContext; }
86 get {
return _transactionalType; }
87 internal set { _transactionalType = value; }
98 get {
return _factoryInfo; }
99 internal set { _factoryInfo = value; }
111 _principal = principal;
112 _remotePortal = isRemotePortal;
114 _clientCulture = System.Globalization.CultureInfo.CurrentCulture.Name;
115 _clientUICulture = System.Globalization.CultureInfo.CurrentUICulture.Name;
118 System.Threading.Thread.CurrentThread.CurrentCulture.Name;
120 System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
125 else if (ApplicationContext.WebContextManager !=
null && ApplicationContext.WebContextManager.IsValid)
143 _principal = principal;
144 _clientContext = clientContext;
145 _clientCulture = clientCulture;
146 _clientUICulture = clientUICulture;
147 _globalContext = globalContext;
148 _remotePortal = isRemotePortal;
161 info.AddValue(
"clientCulture", _clientCulture);
162 info.AddValue(
"clientUICulture", _clientUICulture);
164 info.AddValue(
"isRemotePortal", _remotePortal);
175 _clientCulture = info.GetValue<
string>(
"clientCulture");
176 _clientUICulture = info.GetValue<
string>(
"clientUICulture");
178 _remotePortal = info.GetValue<
bool>(
"isRemotePortal");
Dictionary type that is serializable with the SerializationFormatterFactory.GetFormatter().
Provides consistent context information between the client and server DataPortal objects.
string ClientCulture
The culture setting on the client workstation.
bool IsRemotePortal
Returns true if the server-side DataPortal is running on a remote server via remoting.
string ClientUICulture
The culture setting on the client workstation.
IPrincipal Principal
The current principal object if CSLA security is being used.
ObjectFactoryAttribute FactoryInfo
Gets the current ObjectFactory attribute value (if any).
DataPortalContext(IPrincipal principal, bool isRemotePortal)
Creates a new DataPortalContext object.
DataPortalContext()
Default constructor for use by SerializationFormatterFactory.GetFormatter().
TransactionalTypes TransactionalType
Gets the current transactional type.
DataPortalContext(IPrincipal principal, bool isRemotePortal, string clientCulture, string clientUICulture, ContextDictionary clientContext, ContextDictionary globalContext)
Creates a new DataPortalContext object.
Specifies that the data portal should invoke a factory object rather than the business object.
@ Serialization
The object is being serialized for a clone or data portal operation.
TransactionalTypes
Provides a list of possible transactional technologies to be used by the server-side DataPortal.
@ Serializable
Prevents updating or inserting until the transaction is complete.