Click or drag to resize

imbStringTemplateExtensionsapplyToContent Method (String, PropertyCollection, Boolean)

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Replaces all hard {{{data_fieldname}}} and soft {{data_fieldname}} fields if mached with data PropertyCollection key values.

Namespace:  imbSCI.Core.reporting.extensions
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static string applyToContent(
	this string template,
	PropertyCollection data,
	bool removeUnMatched = false
)
Request Example View Source

Parameters

template
Type: SystemString
Any string that has {{{}}} template tags within
data
Type: System.DataPropertyCollection
Collection with key values matching template tags
removeUnMatched (Optional)
Type: SystemBoolean
If TRUE it will remove all remaining/unmached tags. Use this if collection is the last PropertyCollection to apply

Return Value

Type: String
String with matched template tags replaced with content from data collection

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also