Пример #1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("GetClientCulture:{0} , ", _userenvironnement.GetClientCulture());
            sb.AppendFormat("GetClientImpersonatedUserCode:{0} , ", _userenvironnement.GetClientImpersonatedUserCode());
            sb.AppendFormat("GetClientMachineName:{0} , ", _userenvironnement.GetClientMachineName());
            sb.AppendFormat("GetClientSystemCode:{0} , ", _userenvironnement.GetClientSystemCode());
            sb.AppendFormat("GetClientUICulture:{0} , ", _userenvironnement.GetClientUICulture());
            sb.AppendFormat("GetClientUserCode:{0} , ", _userenvironnement.GetClientUserCode());
            sb.AppendFormat("GetClientUserCodeWithoutDomain:{0} , ", _userenvironnement.GetClientUserCodeWithoutDomain());
            sb.AppendFormat("GetClientUserDomainName:{0} , ", _userenvironnement.GetClientUserDomainName());
            sb.AppendFormat("GetClientUserSessionID:{0} , ", _userenvironnement.GetClientUserSessionID());
            sb.AppendFormat("GetContractName:{0} , ", _userenvironnement.GetContractName());
            sb.AppendFormat("GetCulture:{0} , ", _userenvironnement.GetCulture());
            sb.AppendFormat("GetCurrentCulture:{0} , ", _userenvironnement.GetCurrentCulture());
            sb.AppendFormat("GetCurrentImpersonatedUserCode:{0} , ", _userenvironnement.GetCurrentImpersonatedUserCode());
            sb.AppendFormat("GetCurrentMachineName:{0} , ", _userenvironnement.GetCurrentMachineName());
            sb.AppendFormat("GetCurrentSystemCode:{0} , ", _userenvironnement.GetCurrentSystemCode());
            sb.AppendFormat("GetCurrentUICulture:{0} , ", _userenvironnement.GetCurrentUICulture());
            sb.AppendFormat("GetCurrentUserCode:{0} , ", _userenvironnement.GetCurrentUserCode());
            sb.AppendFormat("GetCurrentUserCodeWithoutDomain:{0} , ", _userenvironnement.GetCurrentUserCodeWithoutDomain());
            sb.AppendFormat("GetCurrentUserDomainName:{0} , ", _userenvironnement.GetCurrentUserDomainName());
            sb.AppendFormat("GetCurrentUserSessionID:{0} , ", _userenvironnement.GetCurrentUserSessionID());
            sb.AppendFormat("GetImpersonatedUserCode:{0} , ", _userenvironnement.GetImpersonatedUserCode());
            sb.AppendFormat("GetMachineName:{0} , ", _userenvironnement.GetMachineName());
            sb.AppendFormat("GetSystemCode:{0} , ", _userenvironnement.GetSystemCode());
            sb.AppendFormat("GetUICulture:{0} , ", _userenvironnement.GetUICulture());
            sb.AppendFormat("GetUserCode:{0} , ", _userenvironnement.GetUserCode());
            sb.AppendFormat("GetUserCodeWithoutDomain:{0} , ", _userenvironnement.GetUserCodeWithoutDomain());
            sb.AppendFormat("GetUserDomainName:{0} , ", _userenvironnement.GetUserDomainName());
            sb.AppendFormat("GetUserSessionID:{0} , ", _userenvironnement.GetUserSessionID());
            sb.AppendFormat("IsDebugModeActivated:{0}", _userenvironnement.IsDebugModeActivated());
            return(sb.ToString());
        }
Пример #2
0
        /// <summary>
        /// Permet de savoir si le caching est activé
        /// </summary>
        /// <returns>True s'il est activé, false dans le cas contraire</returns>
        public static bool IsCachingActivated(IUserEnvironment UserEnvironment)
        {
            //Si le caching n'est pas désactivé via le fichier de configuration
            string cachingValue = ConfigurationManager.AppSettings[CoreRessources.CACHING];

            if (string.IsNullOrEmpty(cachingValue) || !cachingValue.Equals(false.ToString(), StringComparison.OrdinalIgnoreCase))
            {
                //Si le DebugMode est activé, cela désactive automatiquement le caching
                return(!UserEnvironment.IsDebugModeActivated());
            }
            else
            {
                return(false);
            }
        }