Skip to content
ConsoleMonster
Class

ConsoleDashboardOptions

ConsoleMonster.Hosting

Namespace
ConsoleMonster.Hosting
Assembly
ConsoleMonster.Hosting
Modifiers
sealed

Options for ConsoleDashboardServiceCollectionExtensions.AddConsoleDashboard.

Inheritance

  • object
  • ConsoleDashboardOptions

Usage

Explore 31 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 17

Constructors

public ConsoleDashboardOptions() #

Properties

public string? Title { get; set; } #

The title in the header, or null for the application name.

public ConsoleDashboardMode Mode { get; set; } #

When the dashboard is shown (default ConsoleDashboardMode.Auto).

public bool ShowServices { get; set; } #

Whether the hosted services are listed (default true).

public bool ShowLog { get; set; } #

Whether the log region is shown (default true); ConsoleMonster.Extensions.Logging writes into it.

public int LogHeight { get; set; } #

The log region's height in rows (default 8).

public bool KeepFinalState { get; set; } #

Whether the dashboard's final state stays in the scrollback when the host stops (default true).

public Func<Type, string>? ServiceName { get; set; } #

Gives a hosted service its name in the dashboard, or null for its type name (generic arguments and a "Service" or "HostedService" suffix left out).

Extension Methods

public static ConsoleDashboardOptions Configure(ConsoleDashboardOptions consoleDashboardOptions, Action<ConsoleDashboardOptions> configure) #

Assigns callbacks and related configuration without invoking delegate-valued properties.

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance.
configure System.Action<ConsoleMonster.Hosting.ConsoleDashboardOptions> required
Assignments applied in order.

Returns

ConsoleDashboardOptions The same instance.

Examples

// C# initializer or property                                                          // C# fluent
new global::ConsoleMonster.Hosting.ConsoleDashboardOptions { ServiceName = value };    consoleDashboardOptions.Configure(configured => configured.ServiceName = value);
KeepFinalState 2 overloads
public static ConsoleDashboardOptions KeepFinalState(ConsoleDashboardOptions consoleDashboardOptions, bool value) #

Sets ConsoleDashboardOptions.KeepFinalState: Whether the dashboard's final state stays in the scrollback when the host stops (default true).

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance.
value bool required
The value.

Returns

ConsoleDashboardOptions The same instance.

Examples

// C# initializer or property                                                             // C# fluent
new global::ConsoleMonster.Hosting.ConsoleDashboardOptions { KeepFinalState = value };    consoleDashboardOptions.KeepFinalState(value);
public static ConsoleDashboardOptions KeepFinalState(ConsoleDashboardOptions consoleDashboardOptions) #

Sets ConsoleDashboardOptions.KeepFinalState to true.

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance to configure.

Returns

ConsoleDashboardOptions The same instance.
public static ConsoleDashboardOptions LogHeight(ConsoleDashboardOptions consoleDashboardOptions, int value) #

Sets ConsoleDashboardOptions.LogHeight: The log region's height in rows (default 8).

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance.
value int required
The value.

Returns

ConsoleDashboardOptions The same instance.

Examples

// C# initializer or property                                                        // C# fluent
new global::ConsoleMonster.Hosting.ConsoleDashboardOptions { LogHeight = value };    consoleDashboardOptions.LogHeight(value);
public static ConsoleDashboardOptions Mode(ConsoleDashboardOptions consoleDashboardOptions, ConsoleDashboardMode value) #

Sets ConsoleDashboardOptions.Mode: When the dashboard is shown (default ConsoleDashboardMode.Auto).

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance.
value ConsoleMonster.Hosting.ConsoleDashboardMode required
The value.

Returns

ConsoleDashboardOptions The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ConsoleMonster.Hosting.ConsoleDashboardOptions { Mode = value };    consoleDashboardOptions.Mode(value);
ShowLog 2 overloads
public static ConsoleDashboardOptions ShowLog(ConsoleDashboardOptions consoleDashboardOptions, bool value) #

Sets ConsoleDashboardOptions.ShowLog: Whether the log region is shown (default true); ConsoleMonster.Extensions.Logging writes into it.

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance.
value bool required
The value.

Returns

ConsoleDashboardOptions The same instance.

Examples

// C# initializer or property                                                      // C# fluent
new global::ConsoleMonster.Hosting.ConsoleDashboardOptions { ShowLog = value };    consoleDashboardOptions.ShowLog(value);
public static ConsoleDashboardOptions ShowLog(ConsoleDashboardOptions consoleDashboardOptions) #

Sets ConsoleDashboardOptions.ShowLog to true.

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance to configure.

Returns

ConsoleDashboardOptions The same instance.
ShowServices 2 overloads
public static ConsoleDashboardOptions ShowServices(ConsoleDashboardOptions consoleDashboardOptions, bool value) #

Sets ConsoleDashboardOptions.ShowServices: Whether the hosted services are listed (default true).

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance.
value bool required
The value.

Returns

ConsoleDashboardOptions The same instance.

Examples

// C# initializer or property                                                           // C# fluent
new global::ConsoleMonster.Hosting.ConsoleDashboardOptions { ShowServices = value };    consoleDashboardOptions.ShowServices(value);
public static ConsoleDashboardOptions ShowServices(ConsoleDashboardOptions consoleDashboardOptions) #

Sets ConsoleDashboardOptions.ShowServices to true.

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance to configure.

Returns

ConsoleDashboardOptions The same instance.
public static ConsoleDashboardOptions Title(ConsoleDashboardOptions consoleDashboardOptions, string? value) #

Sets ConsoleDashboardOptions.Title: The title in the header, or null for the application name.

Parameters

consoleDashboardOptions ConsoleMonster.Hosting.ConsoleDashboardOptions required
The instance.
value string? required
The value.

Returns

ConsoleDashboardOptions The same instance.

Examples

// C# initializer or property                                                    // C# fluent
new global::ConsoleMonster.Hosting.ConsoleDashboardOptions { Title = value };    consoleDashboardOptions.Title(value);