Table of Contents

Class ConnectionTestViewModel

Namespace
McServerLauncher.ViewModels
Assembly
McServerLauncher.dll

The connection test on a server's network page: where a slow game is coming from.

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

Remarks

It measures the stretches a player's packets cross one at a time — the server alone, this machine's internet, the Playit tunnel for Java, and the one for Bedrock — and each lights up as it finishes, with a sentence that says what it means. Whoever knows nothing about networks reads the sentences; whoever does opens the details, with every round trip's minimum, average, maximum, jitter and loss, the line's speed and peak, the samples, and a report to copy.

With the server off only the internet can be measured; the test says so, and offers to start the server and run again. It never starts it by itself.

Constructors

ConnectionTestViewModel(ServerViewModel)

public ConnectionTestViewModel(ServerViewModel server)

Parameters

server ServerViewModel

Properties

AddressesText

[ExcludeFromCodeCoverage]
public string AddressesText { get; set; }

Property Value

string

BedrockStep

public ConnectionStepViewModel BedrockStep { get; }

Property Value

ConnectionStepViewModel

CopyReportCommand

Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.ConnectionTestViewModel.CopyReport().

[ExcludeFromCodeCoverage]
public IAsyncRelayCommand CopyReportCommand { get; }

Property Value

IAsyncRelayCommand

CopyText

[ExcludeFromCodeCoverage]
public string CopyText { get; set; }

Property Value

string

DetailsOpen

public bool DetailsOpen { get; set; }

Property Value

bool

DownloadText

[ExcludeFromCodeCoverage]
public string DownloadText { get; set; }

Property Value

string

HasRun

[ExcludeFromCodeCoverage]
public bool HasRun { get; set; }

Property Value

bool

HasSamples

public bool HasSamples { get; }

Property Value

bool

HasVerdict

public bool HasVerdict { get; }

Property Value

bool

InternetStep

public ConnectionStepViewModel InternetStep { get; }

Property Value

ConnectionStepViewModel

IsTesting

[ExcludeFromCodeCoverage]
public bool IsTesting { get; set; }

Property Value

bool

LocalStep

public ConnectionStepViewModel LocalStep { get; }

Property Value

ConnectionStepViewModel

PeakText

[ExcludeFromCodeCoverage]
public string PeakText { get; set; }

Property Value

string

Rows

public ObservableCollection<ProbeRow> Rows { get; }

Property Value

ObservableCollection<ProbeRow>

RunButtonText

public string RunButtonText { get; }

Property Value

string

RunCommand

Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.ConnectionTestViewModel.Run().

[ExcludeFromCodeCoverage]
public IAsyncRelayCommand RunCommand { get; }

Property Value

IAsyncRelayCommand

SamplesSeries

The tunnel's round trips, or the server's when there is no tunnel, for the little graph.

[ExcludeFromCodeCoverage]
public IReadOnlyList<double> SamplesSeries { get; set; }

Property Value

IReadOnlyList<double>

SamplesTitle

[ExcludeFromCodeCoverage]
public string SamplesTitle { get; set; }

Property Value

string

ServerWasOff

The last run could not test everything, because the server was off.

[ExcludeFromCodeCoverage]
public bool ServerWasOff { get; set; }

Property Value

bool

StartServerAndRunCommand

Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.ConnectionTestViewModel.StartServerAndRun().

[ExcludeFromCodeCoverage]
public IAsyncRelayCommand StartServerAndRunCommand { get; }

Property Value

IAsyncRelayCommand

Steps

public ObservableCollection<ConnectionStepViewModel> Steps { get; }

Property Value

ObservableCollection<ConnectionStepViewModel>

TunnelStep

public ConnectionStepViewModel TunnelStep { get; }

Property Value

ConnectionStepViewModel

UploadText

[ExcludeFromCodeCoverage]
public string UploadText { get; set; }

Property Value

string

Verdict

One sentence for the whole test, once it has run.

[ExcludeFromCodeCoverage]
public string Verdict { get; set; }

Property Value

string

VerdictState

[ExcludeFromCodeCoverage]
public StepState VerdictState { get; set; }

Property Value

StepState

Methods

Dispose()

Stops a test in progress and lets go of its token, for a server that is being removed.

public void Dispose()