Table of Contents

Class PerformanceSolutionsViewModel

Namespace
McServerLauncher.ViewModels
Assembly
McServerLauncher.dll

The page that replaces the server's tabs when its owner asks how to make it run lighter: settings that cost less, memory if it is the problem and the machine can spare it, and mods that do not change the game.

public sealed class PerformanceSolutionsViewModel : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging, IDisposable
Inheritance
PerformanceSolutionsViewModel
Implements
Inherited Members

Remarks

Everything is a button that does it. Nothing takes effect until the server restarts, and the page says so at the bottom with a button for it, because a change made on a running server that appears to do nothing is the quickest way to make somebody stop trusting the page.

Constructors

PerformanceSolutionsViewModel(ServerViewModel, PerformanceStatus, long?, long?)

public PerformanceSolutionsViewModel(ServerViewModel host, PerformanceStatus status, long? totalRamMb = null, long? availableRamMb = null)

Parameters

host ServerViewModel

The server the page is about.

status PerformanceStatus

The verdict that opened it.

totalRamMb long?

The machine's memory; read from the system when null (a test says its own).

availableRamMb long?

What is free; read from the system when null.

Properties

BackCommand

Gets an IRelayCommand instance wrapping McServerLauncher.ViewModels.PerformanceSolutionsViewModel.Back().

[ExcludeFromCodeCoverage]
public IRelayCommand BackCommand { get; }

Property Value

IRelayCommand

Cause

Why the page was opened, in the band's words.

public string Cause { get; }

Property Value

string

Content

Mods or plugins that lighten the server.

public ObservableCollection<SolutionRow> Content { get; }

Property Value

ObservableCollection<SolutionRow>

HasCause

public bool HasCause { get; }

Property Value

bool

HasContent

public bool HasContent { get; }

Property Value

bool

HasSettings

public bool HasSettings { get; }

Property Value

bool

IsVanilla

True when the server has nothing to install mods into (Vanilla).

public bool IsVanilla { get; }

Property Value

bool

NeedsPlugins

public bool NeedsPlugins { get; }

Property Value

bool

NothingToSuggest

True when there is nothing at all to suggest.

public bool NothingToSuggest { get; }

Property Value

bool

RestartCommand

public IAsyncRelayCommand RestartCommand { get; }

Property Value

IAsyncRelayCommand

Settings

Changes to the server's settings and memory.

public ObservableCollection<SolutionRow> Settings { get; }

Property Value

ObservableCollection<SolutionRow>

Methods

Dispose()

Stops the lookups and lets go of their token. The page is not used after this.

public void Dispose()

Shutdown()

Stops the lookups the page started.

public void Shutdown()