Priya.InfoList.Views.TemplateInfoDetailSave.GetScript C# (CSharp) Method

GetScript() public method

public GetScript ( bool loadMinIfAvailable, bool validate, bool throwException, string &retMessage ) : string
loadMinIfAvailable bool
validate bool
throwException bool
retMessage string
return 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();
		}