Priya.InfoList.Views.TemplateInfoDetailSave.GetScript C# (CSharp) 메소드

GetScript() 공개 메소드

public GetScript ( bool loadMinIfAvailable, bool validate, bool throwException, string &retMessage ) : string
loadMinIfAvailable bool
validate bool
throwException bool
retMessage string
리턴 string
		public virtual string GetScript(bool loadMinIfAvailable, bool validate, bool throwException, out string retMessage)
        {
            string message = null;			
            string scriptTemplate = "";
			try
            {

				//scriptTemplate = LZF.DecompressFromBase64(MinScriptSource_2200);
                if (HttpBaseHandler.DevelopmentTestMode == false)
                {
                    scriptTemplate = LZF.DecompressFromBase64(MinScriptSource_2200);
                }
                else
                {
                    scriptTemplate = ResourceUtil.GetTextFromFile(ScriptRelativeFilePath, HttpBaseHandler.ResourceCache);
                    if (string.IsNullOrEmpty(scriptTemplate) == true)
                    {
						scriptTemplate = ResourceUtil.GetTextFromFile(MinScriptRelativeFilePath, HttpBaseHandler.ResourceCache);
						if (string.IsNullOrEmpty(scriptTemplate) == true)
						{
							scriptTemplate = LZF.DecompressFromBase64(MinScriptSource_2200);
						}
                    }
                }
			}			
			catch (Exception ex)
            {
                 message = "Error:" + ex.Message;
				if (throwException) throw;
            }
            retMessage = message;
			return scriptTemplate.ToString();
		}