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;
        }
Example #2
0
        private void RollIfRequired()
        {
            if (CurrentFileStream.Length < rollSize)
            {
                return;
            }

            CurrentFileStream.Close();
            CurrentFileStream = OpenNextFile(false);
        }
Example #3
0
 public void Dispose()
 {
     CurrentFileStream?.Dispose();
     CurrentFileStream = null;
 }