Improved reading and writing large Office files without copying them into memory (#1243)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-28 23:03:30 +01:00
1 parent 918572c158
commit dbe609a9a7
37 files changed
+1161 -471

No files matched your search

@@ -70,7 +70,7 @@ public abstract partial class DocumentAssistantBase<TSettings>
IReadOnlyList<DocumentSegment> segments;
try
{
segments = await format.ReadAsync(sourcePath, token);
segments = await format.ReadAsync(sourcePath, this.Logger, token);
}
catch (UnsupportedTextEncodingException e)
{
@@ -209,7 +209,7 @@ public partial class SlideAssistant
try
{
this.template = PresentationTemplate.ReadFile(this.templatePath);
this.template = PresentationTemplate.ReadFile(this.templatePath, this.Logger);
}
catch (Exception e)
{
@@ -573,7 +573,7 @@ public partial class SlideAssistant
var result = await PresentationFile.CreateAsync(this.slideDeckTemplatePath, targetPath, deck, this.slideDeckBasis, options, pictures, this.Logger, CancellationToken.None);
if (!result.IsWritten)
{
this.Logger.LogWarning("The PowerPoint template '{TemplatePath}' changed since the slides were planned, and they no longer fit it.", this.slideDeckTemplatePath);
this.Logger.LogWarning("The PowerPoint template '{TemplatePath}' changed since the slides were planned.", this.slideDeckTemplatePath);
await this.MessageBus.SendError(new(AppIcons.SLIDES, TA("The template has changed since the slides were planned. Please create the slides again.")));
return;
}