/// <summary> /// Replaces all hard {{{data_fieldname}}} and soft {{data_fieldname}} fields if mached with <c>data</c> PropertyCollection key values. /// </summary> /// <param name="template">Any string that has {{{}}} template tags within</param> /// <param name="data">Collection with <c>key</c> values matching template tags</param> /// <param name="removeUnMatched">If TRUE it will remove all remaining/unmached tags. Use this if collection is the last PropertyCollection to apply</param> /// <returns>String with matched template tags replaced with content from <c>data</c> collection</returns> public static String applyToContent(this String template, PropertyCollection data, Boolean removeUnMatched = false) { reportTemplatePlaceholderCollection plc = new reportTemplatePlaceholderCollection(); plc.loadTemplateString(template); return(plc.applyToContent(data, template, removeUnMatched)); }
/// <summary> /// Creates placeholder collection /// </summary> /// <param name="template">The template.</param> /// <returns></returns> public static reportTemplatePlaceholderCollection getPlaceHolders(this String template) { reportTemplatePlaceholderCollection plc = new reportTemplatePlaceholderCollection(); plc.loadTemplateString(template); return(plc); }