WatchOptions
ConsoleMonster.Live
Options for ConsoleWatch.Run.
Inheritance
- object
- WatchOptions
Usage
Explore 29 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 14
- Extension method WatchOptions.Count
- Extension method WatchOptions.Differences
- Extension method WatchOptions.Live
- Extension method WatchOptions.PollInterval
- Extension method WatchOptions.Session
- Extension method WatchOptions.Title
- Extension method WatchOptions.WriteTo
- Method WatchOptionsFluent.Count
- Method WatchOptionsFluent.Differences
- Method WatchOptionsFluent.Live
- Method WatchOptionsFluent.PollInterval
- Method WatchOptionsFluent.Session
- Method WatchOptionsFluent.Title
- Method WatchOptionsFluent.WriteTo
Accepted by parameters 15
- Method ConsoleWatch.Run
- Extension method WatchOptions.Count
- Extension method WatchOptions.Differences
- Extension method WatchOptions.Live
- Extension method WatchOptions.PollInterval
- Extension method WatchOptions.Session
- Extension method WatchOptions.Title
- Extension method WatchOptions.WriteTo
- Method WatchOptionsFluent.Count
- Method WatchOptionsFluent.Differences
- Method WatchOptionsFluent.Live
- Method WatchOptionsFluent.PollInterval
- Method WatchOptionsFluent.Session
- Method WatchOptionsFluent.Title
- Method WatchOptionsFluent.WriteTo
Constructors
public WatchOptions() #Inherited Methods
Properties
public TimeSpan PollInterval { get; set; } #The time between the end of one run and the start of the next (default 2 seconds, at least 50 ms).
public int Count { get; set; } #How many runs; zero (default) follows until cancelled interactively, or prints one snapshot without a user.
public bool Differences { get; set; } #Whether cells that changed since the previous run are highlighted.
public string? Title { get; set; } #What is being watched, shown in the heading (markup), or null.
public bool? Live { get; set; } #Whether to show a live view (true), print each run (false), or decide from the terminal (null, default): a live view only on an interactive terminal.
public LiveSessionOptions? Session { get; set; } #The live session's options for the interactive view (inline with the final frame kept, by default).
public Action<IWidget>? Print { get; set; } #Fluent("WriteTo")Where a printed run goes when the view is not live, or null for the current terminal.
public Action<TimeSpan, CancellationToken>? Delay { get; set; } #NoFluentWaits between runs (for tests), or null for a real wait that ends early on cancellation.
Fields
public static readonly TimeSpan MinimumInterval #The shortest interval (50 ms), so a watch never spins.
Extension Methods
public static WatchOptions Count(WatchOptions watchOptions, int value) #Sets WatchOptions.Count: How many runs; zero (default) follows until cancelled interactively, or prints one snapshot without a user.
Parameters
- watchOptions ConsoleMonster.Live.WatchOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Live.WatchOptions { Count = value }; watchOptions.Count(value);public static WatchOptions Differences(WatchOptions watchOptions, bool value = true) #Sets WatchOptions.Differences: Whether cells that changed since the previous run are highlighted.
Parameters
- watchOptions ConsoleMonster.Live.WatchOptions
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Live.WatchOptions { Differences = value }; watchOptions.Differences(value);public static WatchOptions Live(WatchOptions watchOptions, bool? value) #Sets WatchOptions.Live: Whether to show a live view (true), print each run (false), or decide from the terminal (null, default): a live view only on an interactive terminal.
Parameters
- watchOptions ConsoleMonster.Live.WatchOptions
- The instance.
- value bool?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Live.WatchOptions { Live = value }; watchOptions.Live(value);public static WatchOptions PollInterval(WatchOptions watchOptions, TimeSpan value) #Sets WatchOptions.PollInterval: The time between the end of one run and the start of the next (default 2 seconds, at least 50 ms).
Parameters
- watchOptions ConsoleMonster.Live.WatchOptions
- The instance.
- value System.TimeSpan
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Live.WatchOptions { PollInterval = value }; watchOptions.PollInterval(value);public static WatchOptions Session(WatchOptions watchOptions, LiveSessionOptions? value) #Sets WatchOptions.Session: The live session's options for the interactive view (inline with the final frame kept, by default).
Parameters
- watchOptions ConsoleMonster.Live.WatchOptions
- The instance.
- value ConsoleMonster.Live.LiveSessionOptions?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Live.WatchOptions { Session = value }; watchOptions.Session(value);public static WatchOptions Session(WatchOptions watchOptions, Action<LiveSessionOptions> configure) #Configures WatchOptions.Session in place (creating it when not set): The live session's options for the interactive view (inline with the final frame kept, by default).
Parameters
- watchOptions ConsoleMonster.Live.WatchOptions
- The instance.
- configure System.Action<ConsoleMonster.Live.LiveSessionOptions>
- Configures the value.
public static WatchOptions Title(WatchOptions watchOptions, string? value) #Sets WatchOptions.Title: What is being watched, shown in the heading (markup), or null.
Parameters
- watchOptions ConsoleMonster.Live.WatchOptions
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Live.WatchOptions { Title = value }; watchOptions.Title(value);public static WatchOptions WriteTo(WatchOptions watchOptions, Action<IWidget>? value) #Sets WatchOptions.Print: Where a printed run goes when the view is not live, or null for the current terminal.
Parameters
- watchOptions ConsoleMonster.Live.WatchOptions
- The instance.
- value System.Action<ConsoleMonster.Layout.IWidget>?
- The callback.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Live.WatchOptions { Print = value }; watchOptions.WriteTo(value);