Exemplo n.º 1
0
        public static List <Language> GetLanguages(PerformanceMode performanceMode)
        {
            var keyValue = new List <Language>();

            Func <List <Language> > fnc = GetLanguagesFromSettings;

            var args = (object[])null;

            PerformanceHelper.GetPerformance(performanceMode, languagesUniqueKey, out keyValue, fnc, args);

            return(keyValue);
        }
Exemplo n.º 2
0
        public static PageCache GetCache(string id, PerformanceMode performanceMode)
        {
            var keyValue       = new PageCache();
            var performanceKey = uniqueKey + id;

            var fnc = new Func <string, PageCache>(GetCacheFromSettings);

            object[] args = { id };

            PerformanceHelper.GetPerformance <PageCache>(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }
Exemplo n.º 3
0
        public static bool LanguageExists(string locale, PerformanceMode performanceMode)
        {
            var keyValue       = false;
            var performanceKey = $"{uniqueKey}_{locale}_LanguageExistance";

            Func <string, bool> fnc = LanguageExistsFromSettings;

            var args = new object[] { locale };

            PerformanceHelper.GetPerformance(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }
Exemplo n.º 4
0
        public static string GetLocaleDirection(string locale, PerformanceMode performanceMode)
        {
            var keyValue       = "ltr";
            var performanceKey = $"{uniqueKey}_{locale}_LocaleDirection";

            Func <string, string> fnc = GetLocaleDirectionFromSettings;

            var args = new object[] { locale };

            PerformanceHelper.GetPerformance(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }
        public static SEO GetPageSEO(string id, PerformanceMode performanceMode)
        {
            var keyValue       = new SEO();
            var performanceKey = $"{uniqueKey}_{id}";

            Func <string, SEO> fnc = GetPageSEOFromSettings;

            var args = new object[] { id };

            PerformanceHelper.GetPerformance <SEO>(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }
Exemplo n.º 6
0
        public static bool MessageExists(string name, string locale, PerformanceMode performanceMode)
        {
            var keyValue       = false;
            var performanceKey = string.Format("{0}{1}_{2}_MessageExistance", messageUniqueKey, name, locale);

            Func <string, string, bool> fnc = MessageExistsFromSettings;

            var args = new object[] { name, locale };

            PerformanceHelper.GetPerformance <bool>(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }
Exemplo n.º 7
0
        public static string GetMessage(string name, string locale, PerformanceMode performanceMode)
        {
            var keyValue       = string.Empty;
            var performanceKey = string.Format("{0}{1}_{2}", messageUniqueKey, name, locale);

            Func <string, string, string> fnc = GetMessageFromSettings;

            var args = new object[] { name, locale };

            PerformanceHelper.GetPerformance <string>(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }
Exemplo n.º 8
0
        public static string GetExpression(string name, PerformanceMode performanceMode)
        {
            var keyValue       = string.Empty;
            var performanceKey = expressionUniqueKey + name;

            Func <string, string> fnc = GetExpressionFromSettings;

            var args = new object[] { name };

            PerformanceHelper.GetPerformance <string>(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }
Exemplo n.º 9
0
        public static string GetKey(string name, string locale, PerformanceMode performanceMode)
        {
            var keyValue = $"KEY_[{name}]_UNDEFINED";

            var performanceKey = $"{uniqueKey}{name}_{locale}";

            Func <string, string, string> fnc = GetKeyFromSettings;

            var args = new object[] { name, locale };

            PerformanceHelper.GetPerformance(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }
Exemplo n.º 10
0
        public static ServerSettings GetServer(string name, PerformanceMode performanceMode)
        {
            var keyValue = new ServerSettings();

            var performanceKey = uniqueKey + name;

            Func <string, ServerSettings> fnc = GetServerFromSettings;

            var args = new object[] { name };

            PerformanceHelper.GetPerformance(performanceMode, performanceKey, out keyValue, fnc, args);

            return(keyValue);
        }