Skip to content
ConsoleMonster
Class

BrowserGridOptions

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
sealed
Attributes
Fluent

Options for Grid.ShowInBrowser.

Inheritance

  • object
  • BrowserGridOptions

Usage

Explore 13 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.

Accepted by parameters 7

Constructors

public BrowserGridOptions() #

Properties

public Func<Uri, bool>? Open { get; set; } #
Fluent("OpenBy")

Opens the page; returns false when it could not. Null runs the command in the BROWSER environment variable when set, otherwise the default browser (Windows, macOS, or xdg-open on Linux). A launcher that exits with a failure code before the page answers counts as not opened.

public Action<Uri>? Opened { get; set; } #
Fluent("WhenOpened")

Called with the page address before the browser opens, for example to print it.

public TimeSpan? Timeout { get; set; } #

How long to wait for OK or Cancel; null waits until the page answers or the caller cancels.

Extension Methods

public static BrowserGridOptions OpenBy(BrowserGridOptions browserGridOptions, Func<Uri, bool>? value) #

Sets BrowserGridOptions.Open: Opens the page; returns false when it could not. Null runs the command in the BROWSER environment variable when set, otherwise the default browser (Windows, macOS, or xdg-open on Linux). A launcher that exits with a failure code before the page answers counts as not opened.

Parameters

browserGridOptions ConsoleMonster.Interactive.BrowserGridOptions required
The instance.
value System.Func<System.Uri, bool>? required
The callback.

Returns

BrowserGridOptions The same instance.

Examples

// C# initializer or property                                                  // C# fluent
new global::ConsoleMonster.Interactive.BrowserGridOptions { Open = value };    browserGridOptions.OpenBy(value);
public static BrowserGridOptions Timeout(BrowserGridOptions browserGridOptions, TimeSpan? value) #

Sets BrowserGridOptions.Timeout: How long to wait for OK or Cancel; null waits until the page answers or the caller cancels.

Parameters

browserGridOptions ConsoleMonster.Interactive.BrowserGridOptions required
The instance.
value System.TimeSpan? required
The value.

Returns

BrowserGridOptions The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ConsoleMonster.Interactive.BrowserGridOptions { Timeout = value };    browserGridOptions.Timeout(value);
public static BrowserGridOptions WhenOpened(BrowserGridOptions browserGridOptions, Action<Uri>? value) #

Sets BrowserGridOptions.Opened: Called with the page address before the browser opens, for example to print it.

Parameters

browserGridOptions ConsoleMonster.Interactive.BrowserGridOptions required
The instance.
value System.Action<System.Uri>? required
The callback.

Returns

BrowserGridOptions The same instance.

Examples

// C# initializer or property                                                    // C# fluent
new global::ConsoleMonster.Interactive.BrowserGridOptions { Opened = value };    browserGridOptions.WhenOpened(value);