Skip to content
ConsoleMonster
Class

DebugSocketOptions

ConsoleMonster.Headless

Namespace
ConsoleMonster.Headless
Assembly
ConsoleMonster
Modifiers
sealed

Settings for DebugSocket.Start.

Inheritance

  • object
  • DebugSocketOptions

Usage

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

Constructors

public DebugSocketOptions() #

Properties

public int Port { get; set; } #

The port on 127.0.0.1 (default 0: the system picks a free one; read it from DebugSocket.Endpoint or the discovery file).

public string? Token { get; set; } #

The token clients must present, at least 16 characters; null generates a random one per start.

public string? DiscoveryFolder { get; set; } #

The folder for the discovery file (<process id>.json with the port and token), or null for %LOCALAPPDATA%\ConsoleMonster\Debug (the user's local application data elsewhere). The file is removed when the socket stops.

public IList<string> Redact { get; } #

Additional regular expressions whose matches are masked on every screen sent (the recording's built-in secret patterns always apply).

Extension Methods

AddRedact 3 overloads
public static DebugSocketOptions AddRedact(DebugSocketOptions debugSocketOptions, string item) #

Adds an item to DebugSocketOptions.Redact: Additional regular expressions whose matches are masked on every screen sent (the recording's built-in secret patterns always apply).

Parameters

debugSocketOptions ConsoleMonster.Headless.DebugSocketOptions required
The instance.
item string required
The item.

Returns

DebugSocketOptions The same instance.
public static DebugSocketOptions AddRedact(DebugSocketOptions debugSocketOptions, params string[] items) #

Adds items to DebugSocketOptions.Redact: Additional regular expressions whose matches are masked on every screen sent (the recording's built-in secret patterns always apply).

Parameters

debugSocketOptions ConsoleMonster.Headless.DebugSocketOptions required
The instance.
items string[] required
The items, in order.

Returns

DebugSocketOptions The same instance.
public static DebugSocketOptions AddRedact(DebugSocketOptions debugSocketOptions, IEnumerable<string> items) #

Adds items to DebugSocketOptions.Redact: Additional regular expressions whose matches are masked on every screen sent (the recording's built-in secret patterns always apply).

Parameters

debugSocketOptions ConsoleMonster.Headless.DebugSocketOptions required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

DebugSocketOptions The same instance.
public static DebugSocketOptions DiscoveryFolder(DebugSocketOptions debugSocketOptions, string? value) #

Sets DebugSocketOptions.DiscoveryFolder: The folder for the discovery file (<process id>.json with the port and token), or null for %LOCALAPPDATA%\ConsoleMonster\Debug (the user's local application data elsewhere). The file is removed when the socket stops.

Parameters

debugSocketOptions ConsoleMonster.Headless.DebugSocketOptions required
The instance.
value string? required
The value.

Returns

DebugSocketOptions The same instance.

Examples

// C# initializer or property                                                          // C# fluent
new global::ConsoleMonster.Headless.DebugSocketOptions { DiscoveryFolder = value };    debugSocketOptions.DiscoveryFolder(value);
public static DebugSocketOptions Port(DebugSocketOptions debugSocketOptions, int value) #

Sets DebugSocketOptions.Port: The port on 127.0.0.1 (default 0: the system picks a free one; read it from DebugSocket.Endpoint or the discovery file).

Parameters

debugSocketOptions ConsoleMonster.Headless.DebugSocketOptions required
The instance.
value int required
The value.

Returns

DebugSocketOptions The same instance.

Examples

// C# initializer or property                                               // C# fluent
new global::ConsoleMonster.Headless.DebugSocketOptions { Port = value };    debugSocketOptions.Port(value);
public static DebugSocketOptions Token(DebugSocketOptions debugSocketOptions, string? value) #

Sets DebugSocketOptions.Token: The token clients must present, at least 16 characters; null generates a random one per start.

Parameters

debugSocketOptions ConsoleMonster.Headless.DebugSocketOptions required
The instance.
value string? required
The value.

Returns

DebugSocketOptions The same instance.

Examples

// C# initializer or property                                                // C# fluent
new global::ConsoleMonster.Headless.DebugSocketOptions { Token = value };    debugSocketOptions.Token(value);