Class TemplateProcessor
Class which places values from objects into a given template.
Inheritance
System.Object
TemplateProcessor
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: JK.Common.Text
Assembly: JK.Common.dll
Syntax
public class TemplateProcessor
Constructors
| Improve this Doc View SourceTemplateProcessor(String)
Initializes a new instance of the TemplateProcessor class.
Declaration
public TemplateProcessor(string template)
Parameters
Type | Name | Description |
---|---|---|
System.String | template | Template place data values into. |
TemplateProcessor(String, String, String)
Initializes a new instance of the TemplateProcessor class.
Declaration
public TemplateProcessor(string template, string tokenStart, string tokenEnd)
Parameters
Type | Name | Description |
---|---|---|
System.String | template | Template place data values into. |
System.String | tokenStart | Starting value of the tokens used in the template. |
System.String | tokenEnd | Ending value of the tokens used in the template. |
Properties
| Improve this Doc View SourceObjects
Gets or sets the list of objects containing the data to be used in the template.
Declaration
public List<object> Objects { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Object> |
TokenEnd
Gets or sets the ending value of the tokens used in the template.
Declaration
public string TokenEnd { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TokenStart
Gets or sets the starting value of the tokens used in the template.
Declaration
public string TokenStart { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceProcessTemplate()
Processes the template using the given objects.
Declaration
public string ProcessTemplate()
Returns
Type | Description |
---|---|
System.String | Template format with data inserted where tokens existed. |