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
hostServerViewModelThe server the page is about.
statusPerformanceStatusThe verdict that opened it.
totalRamMblong?The machine's memory; read from the system when null (a test says its own).
availableRamMblong?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
Cause
Why the page was opened, in the band's words.
public string Cause { get; }
Property Value
Content
Mods or plugins that lighten the server.
public ObservableCollection<SolutionRow> Content { get; }
Property Value
HasCause
public bool HasCause { get; }
Property Value
HasContent
public bool HasContent { get; }
Property Value
HasSettings
public bool HasSettings { get; }
Property Value
IsVanilla
True when the server has nothing to install mods into (Vanilla).
public bool IsVanilla { get; }
Property Value
NeedsPlugins
public bool NeedsPlugins { get; }
Property Value
NothingToSuggest
True when there is nothing at all to suggest.
public bool NothingToSuggest { get; }
Property Value
RestartCommand
public IAsyncRelayCommand RestartCommand { get; }
Property Value
Settings
Changes to the server's settings and memory.
public ObservableCollection<SolutionRow> Settings { get; }
Property Value
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()