mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-06 04:51:36 +00:00
Improved reading and writing large Office files without copying them into memory (#1243)
This commit is contained in:
1 parent
918572c158
commit
dbe609a9a7
37 files changed
+1161
-471
No files matched your search
@@ -362,11 +362,11 @@ public sealed class LatexSegmentFormatTests
|
||||
|
||||
private void WriteSource(string text) => File.WriteAllText(this.source, text, new UTF8Encoding(encoderShouldEmitUTF8Identifier: false));
|
||||
|
||||
private async Task<List<string>> KeysAsync() => (await this.format.ReadAsync(this.source, CancellationToken.None)).Select(segment => segment.Key).ToList();
|
||||
private async Task<List<string>> KeysAsync() => (await this.format.ReadAsync(this.source, NullLogger.Instance, CancellationToken.None)).Select(segment => segment.Key).ToList();
|
||||
|
||||
private async Task<SegmentResults> ResultsAsync(Func<string, string> transform)
|
||||
{
|
||||
var segments = await this.format.ReadAsync(this.source, CancellationToken.None);
|
||||
var segments = await this.format.ReadAsync(this.source, NullLogger.Instance, CancellationToken.None);
|
||||
return new SegmentResults(segments
|
||||
.Where(segment => segment.HasWords)
|
||||
.DistinctBy(segment => segment.Key)
|
||||
|
||||
Reference in new issue
Block a user