using System.Collections.Generic;
namespace SalesforceWeeklyUpdateEmail
internal class TemplateGen
const string SECTION_TEMPLATE = "";
const string ITEM_TEMPLATE = "";
internal string Content { get; set; }
internal TemplateGen(QueryResult qr)
var sections = this.GroupToSections(qr);
var sectionTemplate = LoadFile(SECTION_TEMPLATE);
string dummyTemplate = @"{{#each Section}}{{this.Prospects}}";
var sectionBuilder = Handlebars.Compile(dummyTemplate);
Content = sectionBuilder(sections);
private List<Section> GroupToSections(QueryResult qr)
return new List<Section>() {
private static string LoadFile(string filePath)
StreamReader sr = new StreamReader(filePath);
internal string Name { get; set; }
List<Prospect> Prospects { get; set; }
internal string? Name { get; set; }
internal class QueryResults {