public void RegisterTokens(ITokenizedTemplateTokenController tokenizedTemplateTokenController) { tokenizedTemplateTokenController.Register(new TokenizedTemplateEnumerableToken(new Guid("{82944BE4-1557-4780-B61C-DB5EB5AB5D89}"), EmailHealthEncouragementContainer.DateTypeId, "ContentRecommendations", "ContentRecommendations_Description", _translationController, tc => { List <TemplateContext> list = new List <TemplateContext>(); foreach (ContentRecommendation contentRecommendation in tc.Get <EmailHealthEncouragementContainer>(EmailHealthEncouragementContainer.DateTypeId).ContentRecommendations) { TemplateContext templateContext = new TemplateContext(); templateContext.AddItem(Telligent.Evolution.Api.Content.ContentTypes.GenericContent, (object)contentRecommendation.Content); list.Add(templateContext); } return(list); }, Telligent.Evolution.Api.Content.ContentTypes.GenericContent)); }
public void RegisterTokens(ITokenizedTemplateTokenController tokenizedTemplateTokenController) { tokenizedTemplateTokenController.Register(new TokenizedTemplateEnumerableToken(new Guid("{82944BE4-1557-4780-B61C-DB5EB5AB5D89}"), EmailHealthEncouragementContainer.DateTypeId, "ContentRecommendations", "ContentRecommendations_Description", _translationController, tc => { List<TemplateContext> list = new List<TemplateContext>(); foreach (ContentRecommendation contentRecommendation in tc.Get<EmailHealthEncouragementContainer>(EmailHealthEncouragementContainer.DateTypeId).ContentRecommendations) { TemplateContext templateContext = new TemplateContext(); templateContext.AddItem(Telligent.Evolution.Api.Content.ContentTypes.GenericContent, (object)contentRecommendation.Content); list.Add(templateContext); } return list; }, Telligent.Evolution.Api.Content.ContentTypes.GenericContent)); }