Table of Contents

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

IsStarting Func<bool>

Whether the server is already coming up (changes what a client is told).

Motd Func<string>

The server's own message of the day.

MaxPlayers Func<int>

The server's player limit.

CanStart Func<bool>

Whether a start would be accepted right now.

Say Action<string>

Writes a line in the server's console.

Notify Action<NotificationKind, string>

Raises a notification of the given kind.

StartServer Action

Starts the server, unattended.

RunOnUi Action<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

Func<bool>

IsStarting

Whether the server is already coming up (changes what a client is told).

public Func<bool> IsStarting { get; init; }

Property Value

Func<bool>

MaxPlayers

The server's player limit.

public Func<int> MaxPlayers { get; init; }

Property Value

Func<int>

Motd

The server's own message of the day.

public Func<string> Motd { get; init; }

Property Value

Func<string>

Notify

Raises a notification of the given kind.

public Action<NotificationKind, string> Notify { get; init; }

Property Value

Action<NotificationKind, string>

RunOnUi

Runs something on the UI thread; the listener calls from its own.

public Action<Action> RunOnUi { get; init; }

Property Value

Action<Action>

Say

Writes a line in the server's console.

public Action<string> Say { get; init; }

Property Value

Action<string>

StartServer

Starts the server, unattended.

public Action StartServer { get; init; }

Property Value

Action