示例#1
0
 public static void GetHpFramesAndScripts(string countryCode, string languageCode, out HpFramesDto frames, out HpScriptsDto scripts)
 {
     frames = GetHpFramesFromCache(countryCode, languageCode, false);
     scripts = utility.fillHpScripts(countryCode, languageCode);
 }
示例#2
0
        internal static HpScriptsDto fillHpScripts(string countryCode, string languageCode)
        {
            string path = getParameter("path_to_scriptparts");
            string scriptFile = string.Format("{0}scripts_{1}_{2}.txt", path, countryCode, languageCode);

            HttpServerUtility server = HttpContext.Current.Server;
            try
            {
                string script = File.ReadAllText(server.MapPath(scriptFile));
                HpScriptsDto hpScripts = new HpScriptsDto(script, countryCode, languageCode);
                return hpScripts;
            }
            catch (Exception)
            {
#if !DEBUG
		        throw;
#endif
            }
#if DEBUG
            return new HpScriptsDto(string.Empty, countryCode, languageCode);
#endif
        }