public async Task GetSummaryAsync() { try { CanShowOutput.ThrowIfFalse(nameof(CanShowOutput)); CurrentFileStream.ThrowIfNull(nameof(CurrentFileStream)); (IsError, IsBusy) = (false, true); await SaveOptionsAsync(); CurrentFileStream.Position = 0; Options.CurrentFilePath = CurrentFileName; CommandHandlerSoE commandHandler = new(); var summary = commandHandler.GetSummary(CurrentFileStream, Options); OutputMessage = summary.ReplaceWithHtmlLineBreaks(); } catch (Exception ex) { OutputMessage = ex.GetColoredMessage(); IsError = true; } IsBusy = false; }
private void RollIfRequired() { if (CurrentFileStream.Length < rollSize) { return; } CurrentFileStream.Close(); CurrentFileStream = OpenNextFile(false); }
public void Dispose() { CurrentFileStream?.Dispose(); CurrentFileStream = null; }