Exemplo n.º 1
0
        public INotificationContentBuilder AddLink(string href, string text)
        {
            var template = LoadFromFile(LinkTemplateName);
            var injected = InjectContentIntoTemplate(template, ("Link-Href", href), ("Link-Content", text));

            _contentSections.Add(injected);
            return(this);
        }
Exemplo n.º 2
0
        public INotificationContentBuilder AddText(string text)
        {
            var template = LoadFromFile(TextTemplateName);
            var injected = InjectContentIntoTemplate(template, ("Text-Content", text));

            _contentSections.Add(injected);
            return(this);
        }
Exemplo n.º 3
0
        public string Build()
        {
            var template       = LoadFromFile(BaseTemplateName);
            var joinedSections = string.Join('\n', _contentSections);
            var injectedHtml   = InjectContentIntoTemplate(
                template,
                ("Layout-Title", _title),
                ("Layout-Content", joinedSections));

            return(InlineCss(injectedHtml));
        }