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

GetTemplate() public method

public GetTemplate ( string templateSuffix, bool validate, bool throwException, string &retMessage ) : string
templateSuffix string
validate bool
throwException bool
retMessage string
return string
		public virtual string GetTemplate(string templateSuffix, bool validate, bool throwException, out string retMessage)
        {
            string message ="";
            string template = "";
			
            if ((HttpBaseHandler.DevelopmentTestMode == false) && (HttpBaseHandler.ProductionTestMode == false))
            {
				if (string.IsNullOrEmpty(template) ==true)
                {
					template = LZF.DecompressFromBase64(TemplateSource_176);
				}
            }
            else
            {
				if (string.IsNullOrEmpty(templateSuffix) ==false)
				{
                    string fileExtension = IOManager.GetExtension(RelativeFilePath);
					string suffixRelativeFilePath = RelativeFilePath.Replace(fileExtension, "." + templateSuffix + fileExtension);
                    template = ResourceUtil.GetTextFromFile(suffixRelativeFilePath, HttpBaseHandler.ResourceCache);
				}
				if (string.IsNullOrEmpty(template) ==true)
				{
					template = ResourceUtil.GetTextFromFile(RelativeFilePath, HttpBaseHandler.ResourceCache);
				}
                if (string.IsNullOrEmpty(template) == true)
                {
					if (string.IsNullOrEmpty(template) == true)
					{
						template = LZF.DecompressFromBase64(TemplateSource_176);
					}
                }
            }
			
            retMessage = message;
			return template;
		}