mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 05:55:21 -04:00
Add note explaining why Razor templates are not rendered directly
This commit is contained in:
parent
0a6fea1ce9
commit
265cb71dfd
1 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,8 @@ namespace DiscordChatExporter.Core.Exporting.Writers
|
||||||
{
|
{
|
||||||
var templateContext = new PreambleTemplateContext(Context, _themeName);
|
var templateContext = new PreambleTemplateContext(Context, _themeName);
|
||||||
|
|
||||||
|
// We are not writing directly to output because Razor
|
||||||
|
// does not actually do asynchronous writes to stream.
|
||||||
await _writer.WriteLineAsync(
|
await _writer.WriteLineAsync(
|
||||||
await PreambleTemplate.RenderAsync(templateContext)
|
await PreambleTemplate.RenderAsync(templateContext)
|
||||||
);
|
);
|
||||||
|
@ -34,6 +36,8 @@ namespace DiscordChatExporter.Core.Exporting.Writers
|
||||||
{
|
{
|
||||||
var templateContext = new MessageGroupTemplateContext(Context, messageGroup);
|
var templateContext = new MessageGroupTemplateContext(Context, messageGroup);
|
||||||
|
|
||||||
|
// We are not writing directly to output because Razor
|
||||||
|
// does not actually do asynchronous writes to stream.
|
||||||
await _writer.WriteLineAsync(
|
await _writer.WriteLineAsync(
|
||||||
await MessageGroupTemplate.RenderAsync(templateContext)
|
await MessageGroupTemplate.RenderAsync(templateContext)
|
||||||
);
|
);
|
||||||
|
@ -66,6 +70,8 @@ namespace DiscordChatExporter.Core.Exporting.Writers
|
||||||
|
|
||||||
var templateContext = new PostambleTemplateContext(Context, MessagesWritten);
|
var templateContext = new PostambleTemplateContext(Context, MessagesWritten);
|
||||||
|
|
||||||
|
// We are not writing directly to output because Razor
|
||||||
|
// does not actually do asynchronous writes to stream.
|
||||||
await _writer.WriteLineAsync(
|
await _writer.WriteLineAsync(
|
||||||
await PostambleTemplate.RenderAsync(templateContext)
|
await PostambleTemplate.RenderAsync(templateContext)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue