Table of Contents

Class ServerConfigEffects

Namespace
McServerLauncher.ViewModels
Assembly
McServerLauncher.dll

One row per ServerConfig field: what it feeds, and what has to be redone when it changes.

public static class ServerConfigEffects
Inheritance
ServerConfigEffects
Inherited Members

Remarks

The same instinct as ServerTypeCatalog — one table, and everything reads from it. It exists because the bug this repository kept shipping was never a hard one: a field changed, and some getter somewhere went on returning the old answer because nobody remembered it was derived. Spreading the knowledge across a method per view model meant every new field was a fresh chance to forget.

ServerConfigEffectsTests makes forgetting impossible rather than merely discouraged: every writable property of ServerConfig must appear here exactly once, and every property name a row mentions must still exist on the view model it names. A field added without a row fails the build's tests on the day it is written.

Persisting is deliberately not one of the effects. Saving stays where it already is: once, when a server's settings are saved.

Fields

All

Every field of the config, and what depends on it.

public static readonly ServerConfigEffects.Row[] All

Field Value

Row[]

Properties

Everything

Everything every field feeds, for a refresh that cannot know what moved.

public static ServerConfigEffects.Row Everything { get; }

Property Value

ServerConfigEffects.Row

Methods

For(string)

The row for a config property, or null if it has none (which the tests forbid).

public static ServerConfigEffects.Row? For(string configProperty)

Parameters

configProperty string

Returns

ServerConfigEffects.Row