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
KindSignalKindThe kind of signal; the view model picks its colour.
HintKeystringThe resource key of the hint under the dot.
ShowTunnelWarningboolWhether 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
Kind
The kind of signal; the view model picks its colour.
public SignalKind Kind { get; init; }
Property Value
ShowTunnelWarning
Whether to draw attention to the missing tunnel.
public bool ShowTunnelWarning { get; init; }
Property Value
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
stateServerStateplayitEnabledboolplayitPlayitState