/// <summary> /// Creates a new DataPortalContext object. /// </summary> /// <param name="principal">The current Principal object.</param> /// <param name="isRemotePortal">Indicates whether the DataPortal is remote.</param> public DataPortalContext(IPrincipal principal, bool isRemotePortal) { if (isRemotePortal) { _principal = principal; _remotePortal = isRemotePortal; _clientCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name; _clientUICulture = System.Threading.Thread.CurrentThread.CurrentUICulture.Name; _clientContext = DistributionContext.GetClientContext(); _globalContext = DistributionContext.GetGlobalContext(); } }