scriban

Scriban Template Engine Multi loop Supports

萝らか妹 提交于 2020-07-23 06:22:14
问题 I am trying to use Scriban Template Engine for multiple loop support. For Example string bodyTextSub = "{{ for service in services }} ServiceName: {{ service }} {{ end }}" + "{{ for subservice in subServiceList }} SubServiceName: {{ subservice }} {{ end }}"; List<string> subServiceList = new List<string> { "PingSubService", "UrlSubService" }; Dictionary<string, List<string>> serviceDictionary = new Dictionary<string, List<string>>() { {"emailContent", subServiceList}, {"mailContent",

Scriban Template Engine Multi loop Supports

こ雲淡風輕ζ 提交于 2020-07-23 06:20:54
问题 I am trying to use Scriban Template Engine for multiple loop support. For Example string bodyTextSub = "{{ for service in services }} ServiceName: {{ service }} {{ end }}" + "{{ for subservice in subServiceList }} SubServiceName: {{ subservice }} {{ end }}"; List<string> subServiceList = new List<string> { "PingSubService", "UrlSubService" }; Dictionary<string, List<string>> serviceDictionary = new Dictionary<string, List<string>>() { {"emailContent", subServiceList}, {"mailContent",