MCPcopy Create free account
hub / github.com/aptabase/aptabase / GetTemplate

Method GetTemplate

src/Features/Notification/TemplateEngine.cs:26–39  ·  view source on GitHub ↗
(string name)

Source from the content-addressed store, hash-verified

24 }
25
26 public async Task<string> GetTemplate(string name)
27 {
28 if (_templates.ContainsKey(name))
29 return _templates[name];
30
31 var resourceStream = _assembly.GetManifestResourceStream($"Aptabase.assets.Templates.{name}.html");
32 if (resourceStream == null)
33 throw new Exception($"Failed to find the embedded resource named {name}");
34
35 var reader = new StreamReader(resourceStream, Encoding.UTF8);
36 var content = await reader.ReadToEndAsync();
37 _templates.Add(name, content);
38 return content;
39 }
40}

Callers

nothing calls this directly

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected