Class LogBatcher
- Namespace
- McServerLauncher.Views
- Assembly
- McServerLauncher.dll
Buffered progress logger for dialog TextBoxes (EFI-6): the Forge installer prints thousands of lines, and appending each one directly (Text += line) froze the UI. Lines are buffered and flushed a few times per second, keeping only the most recent McServerLauncher.Views.LogBatcher.MaxLines. Extracted from the old create dialog and the old loader dialog, which kept two identical copies of this logic. A view that comes and goes stops it while it is off screen and starts it again when it is back.
public sealed class LogBatcher
- Inheritance
-
LogBatcher
- Inherited Members
Constructors
LogBatcher(TextBox)
public LogBatcher(TextBox target)
Parameters
targetTextBox
Methods
Append(string)
Queues a line (called via Progress<string>, i.e. on the UI thread).
public void Append(string line)
Parameters
linestring
Start()
public void Start()
Stop()
public void Stop()