Interface ITemplateParser
Data template parser interface
Namespace: Simplic.Utilities.TemplateParser
Assembly: TemplateParser.dll
Syntax
public interface ITemplateParser
Methods
| Improve this Doc View SourceParseTemplate(String, IDictionary<String, Object>)
Parses an input with given dictionary values.
Declaration
string ParseTemplate(string input, IDictionary<string, object> values)
Parameters
Type | Name | Description |
---|---|---|
System.String | input | Raw input string, i.e.: Hi {Name} |
System.Collections.Generic.IDictionary<System.String, System.Object> | values | A dictionary of values to replace the variables in the input string |
Returns
Type | Description |
---|---|
System.String | A parsed string with the values replaced. |
ParseTemplate(String, IDictionary<String, String>)
Parses an input with given dictionary values.
Declaration
string ParseTemplate(string input, IDictionary<string, string> values)
Parameters
Type | Name | Description |
---|---|---|
System.String | input | Raw input string, i.e.: Hi {Name} |
System.Collections.Generic.IDictionary<System.String, System.String> | values | A dictionary of values to replace the variables in the input string |
Returns
Type | Description |
---|---|
System.String | A parsed string with the values replaced. |
ParseTemplate(String, Object[])
Parses an input with given object values.
Declaration
string ParseTemplate(string input, object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.String | input | Raw input string, i.e.: Hi {Name} |
System.Object[] | values | An array of objects to replace the variables in the input string |
Returns
Type | Description |
---|---|
System.String | A parsed string with the values replaced. |