Beispiel #1
0
		protected string ProcessBoolDataRefTypeNameEnabledSection(DataRefTypeNameEnabled datareftypenameenabled, 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, datareftypenameenabled.AddMode ? sectionValue : "");
            }

            if (invertedSectionTag.Trim().Length > 0)
            {
                template = template.Replace(invertedSectionTag, datareftypenameenabled.AddMode ? "" : invertedSectionValue);
            }                    

            #endregion

            #endregion
			
			return template;
		}
Beispiel #2
0
		protected string ProcessListDataRefTypeNameEnabledSection(DataRefTypeNameEnabled datareftypenameenabled, string template)
		{

			return template;
		}