Class PlaceholderReplacer
- Namespace
- Dynamicweb.Mailing
- Assembly
- Dynamicweb.Core.dll
Class PlaceholderReplacer.
public class PlaceholderReplacer
- Inheritance
-
PlaceholderReplacer
- Inherited Members
Methods
FindPlaceholders(string)
Find placeholders in specified content
public static IEnumerable<string> FindPlaceholders(string content)
Parameters
content
stringThe content.
Returns
- IEnumerable<string>
A list of placeholders.
Remarks
A list contains unique placeholders without opening and closing brackets
ReplacePlaceholders(string, IDictionary<string, object>)
Replace placeholders in specified content
public static string ReplacePlaceholders(string content, IDictionary<string, object> values)
Parameters
content
stringThe content.
values
IDictionary<string, object>The values for placeholders.
Returns
ReplacePlaceholders(string, IDictionary<string, object>, bool)
Replace placeholders in specified content
public static string ReplacePlaceholders(string content, IDictionary<string, object> values, bool removeMissingPlaceholders)
Parameters
content
stringThe content.
values
IDictionary<string, object>The values for placeholders.
removeMissingPlaceholders
boolWhen it is
true
removes missing placeholders.