Class WakeHost
- Namespace
- McServerLauncher.ViewModels
- Assembly
- McServerLauncher.dll
What WakeOnDemandController needs to know about, and to be able to do to, its server.
public sealed record WakeHost : IEquatable<WakeHost>
- Inheritance
-
WakeHost
- Implements
- Inherited Members
Constructors
WakeHost(Func<bool>, Func<string>, Func<int>, Func<bool>, Action<string>, Action<NotificationKind, string>, Action, Action<Action>)
What WakeOnDemandController needs to know about, and to be able to do to, its server.
public WakeHost(Func<bool> IsStarting, Func<string> Motd, Func<int> MaxPlayers, Func<bool> CanStart, Action<string> Say, Action<NotificationKind, string> Notify, Action StartServer, Action<Action> RunOnUi)
Parameters
IsStartingFunc<bool>Whether the server is already coming up (changes what a client is told).
MotdFunc<string>The server's own message of the day.
MaxPlayersFunc<int>The server's player limit.
CanStartFunc<bool>Whether a start would be accepted right now.
SayAction<string>Writes a line in the server's console.
NotifyAction<NotificationKind, string>Raises a notification of the given kind.
StartServerActionStarts the server, unattended.
RunOnUiAction<Action>Runs something on the UI thread; the listener calls from its own.
Properties
CanStart
Whether a start would be accepted right now.
public Func<bool> CanStart { get; init; }
Property Value
IsStarting
Whether the server is already coming up (changes what a client is told).
public Func<bool> IsStarting { get; init; }
Property Value
MaxPlayers
The server's player limit.
public Func<int> MaxPlayers { get; init; }
Property Value
Motd
The server's own message of the day.
public Func<string> Motd { get; init; }
Property Value
Notify
Raises a notification of the given kind.
public Action<NotificationKind, string> Notify { get; init; }
Property Value
RunOnUi
Runs something on the UI thread; the listener calls from its own.
public Action<Action> RunOnUi { get; init; }
Property Value
Say
Writes a line in the server's console.
public Action<string> Say { get; init; }
Property Value
StartServer
Starts the server, unattended.
public Action StartServer { get; init; }