protected string ProcessBoolAdditionalVisibleSection(AdditionalVisible additionalvisible, string template) { string sectionStartTag; string sectionEndTag; string sectionTag; string sectionValue; #region Bool Section Processing #region Get Section Tag/Value sectionStartTag = "{{#IsActiveHidden}}"; sectionEndTag = "{{/IsActiveHidden}}"; sectionTag = TemplateUtil.GetSectionTag(template, sectionStartTag, sectionEndTag); sectionValue = sectionTag.Replace(sectionStartTag, "").Replace(sectionEndTag, ""); #endregion #region Bool Section if (sectionTag.Trim().Length > 0) { template = template.Replace(sectionTag, additionalvisible.IsActiveHidden ? sectionValue : ""); } #endregion #endregion string invertedSectionTag; string invertedSectionValue; string invertedSectionStartTag ; string invertedSectionEndTag; #region Bool Section Processing #region Get Section Tag/Value sectionStartTag = "{{#IsActive}}"; sectionEndTag = "{{/IsActive}}"; sectionTag = TemplateUtil.GetSectionTag(template, sectionStartTag, sectionEndTag); sectionValue = sectionTag.Replace(sectionStartTag, "").Replace(sectionEndTag, ""); #endregion #region Get Inverted Section Tag/Value invertedSectionStartTag = "{{^IsActive}}"; invertedSectionEndTag = "{{/IsActive}}"; 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, additionalvisible.IsActive ? sectionValue : ""); } if (invertedSectionTag.Trim().Length > 0) { template = template.Replace(invertedSectionTag, additionalvisible.IsActive ? "" : invertedSectionValue); } #endregion #endregion #region Bool Section Processing #region Get Section Tag/Value sectionStartTag = "{{#IsDeletedHidden}}"; sectionEndTag = "{{/IsDeletedHidden}}"; sectionTag = TemplateUtil.GetSectionTag(template, sectionStartTag, sectionEndTag); sectionValue = sectionTag.Replace(sectionStartTag, "").Replace(sectionEndTag, ""); #endregion #region Bool Section if (sectionTag.Trim().Length > 0) { template = template.Replace(sectionTag, additionalvisible.IsDeletedHidden ? sectionValue : ""); } #endregion #endregion #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, additionalvisible.IsDeleted ? sectionValue : ""); } if (invertedSectionTag.Trim().Length > 0) { template = template.Replace(invertedSectionTag, additionalvisible.IsDeleted ? "" : invertedSectionValue); } #endregion #endregion #region Bool Section Processing #region Get Section Tag/Value sectionStartTag = "{{#SequenceHidden}}"; sectionEndTag = "{{/SequenceHidden}}"; sectionTag = TemplateUtil.GetSectionTag(template, sectionStartTag, sectionEndTag); sectionValue = sectionTag.Replace(sectionStartTag, "").Replace(sectionEndTag, ""); #endregion #region Bool Section if (sectionTag.Trim().Length > 0) { template = template.Replace(sectionTag, additionalvisible.SequenceHidden ? sectionValue : ""); } #endregion #endregion #region Bool Section Processing #region Get Section Tag/Value sectionStartTag = "{{#AddMode}}"; sectionEndTag = "{{/AddMode}}"; sectionTag = TemplateUtil.GetSectionTag(template, sectionStartTag, sectionEndTag); sectionValue = sectionTag.Replace(sectionStartTag, "").Replace(sectionEndTag, ""); #endregion #region Get Inverted Section Tag/Value invertedSectionStartTag = "{{^AddMode}}"; invertedSectionEndTag = "{{/AddMode}}"; 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, additionalvisible.AddMode ? sectionValue : ""); } if (invertedSectionTag.Trim().Length > 0) { template = template.Replace(invertedSectionTag, additionalvisible.AddMode ? "" : invertedSectionValue); } #endregion #endregion return template; }
protected string ProcessListAdditionalVisibleSection(AdditionalVisible additionalvisible, string template) { return template; }