Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string ProcessTemplate(Template templateToProcess, object templateModel)
- {
- var tokenDictionary = new Dictionary<string, string>();
- var templateModelProperties = templateModel.GetType().GetProperties();
- foreach (var property in templateModelProperties)
- {
- var key = property.Name;
- var value = (string) property.GetValue(templateModel, null);
- tokenDictionary.Add(key,value);
- }
- return ProcessTemplate(templateToProcess, tokenDictionary);
- }
Add Comment
Please, Sign In to add comment