Table of Contents

Struct ReachabilitySignal

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

What the signal shows: its kind, the hint to explain it, and whether to warn.

public readonly record struct ReachabilitySignal : IEquatable<ReachabilitySignal>
Implements
Inherited Members

Constructors

ReachabilitySignal(SignalKind, string, bool)

What the signal shows: its kind, the hint to explain it, and whether to warn.

public ReachabilitySignal(SignalKind Kind, string HintKey, bool ShowTunnelWarning)

Parameters

Kind SignalKind

The kind of signal; the view model picks its colour.

HintKey string

The resource key of the hint under the dot.

ShowTunnelWarning bool

Whether to draw attention to the missing tunnel.

Properties

HintKey

The resource key of the hint under the dot.

public string HintKey { get; init; }

Property Value

string

Kind

The kind of signal; the view model picks its colour.

public SignalKind Kind { get; init; }

Property Value

SignalKind

ShowTunnelWarning

Whether to draw attention to the missing tunnel.

public bool ShowTunnelWarning { get; init; }

Property Value

bool

Methods

For(ServerState, bool, PlayitState)

Computes the "signal" (real reachability): green only if the server is running and, when using Playit, the tunnel is active. If running without a tunnel, red + warning.

public static ReachabilitySignal For(ServerState state, bool playitEnabled, PlayitState playit)

Parameters

state ServerState
playitEnabled bool
playit PlayitState

Returns

ReachabilitySignal