protected string ProcessBoolDataRefTypeNameDisabledSection(DataRefTypeNameDisabled datareftypenamedisabled, 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 = "{{#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, datareftypenamedisabled.AddMode ? sectionValue : ""); } if (invertedSectionTag.Trim().Length > 0) { template = template.Replace(invertedSectionTag, datareftypenamedisabled.AddMode ? "" : invertedSectionValue); } #endregion #endregion return template; }
protected string ProcessListDataRefTypeNameDisabledSection(DataRefTypeNameDisabled datareftypenamedisabled, string template) { return template; }