protected string ProcessBoolIsDeletedVisibleSection(IsDeletedVisible isdeletedvisible, string template) { string sectionStartTag; string sectionEndTag; string sectionTag; string sectionValue; string invertedSectionTag; string invertedSectionValue; string invertedSectionStartTag ; string invertedSectionEndTag; #region Bool Section Processing #region Get Section Tag/Value sectionStartTag = "{{#IsDeleted}}"; sectionEndTag = "{{/IsDeleted}}"; sectionTag = TemplateUtil.GetSectionTag(template, sectionStartTag, sectionEndTag); sectionValue = sectionTag.Replace(sectionStartTag, "").Replace(sectionEndTag, ""); #endregion #region Get Inverted Section Tag/Value invertedSectionStartTag = "{{^IsDeleted}}"; invertedSectionEndTag = "{{/IsDeleted}}"; invertedSectionTag = TemplateUtil.GetSectionTag(template, invertedSectionStartTag, invertedSectionEndTag); invertedSectionValue = invertedSectionTag.Replace(invertedSectionStartTag, "").Replace(invertedSectionEndTag, ""); #endregion #region Bool Section if (sectionTag.Trim().Length > 0) { template = template.Replace(sectionTag, isdeletedvisible.IsDeleted ? sectionValue : ""); } if (invertedSectionTag.Trim().Length > 0) { template = template.Replace(invertedSectionTag, isdeletedvisible.IsDeleted ? "" : invertedSectionValue); } #endregion #endregion return template; }
protected string ProcessListIsDeletedVisibleSection(IsDeletedVisible isdeletedvisible, string template) { return template; }