Table of Contents

Class UpdateCheck

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Turning the update service's answer into one of the three outcomes a person can be told about.

public static class UpdateCheck
Inheritance
UpdateCheck
Inherited Members

Remarks

CheckAsync(Version, bool, CancellationToken) returns null for "nothing newer" and throws when it cannot ask, and the old code swallowed both the same way. That was fine for a banner that only appears when there is news. A button someone presses has to say which of the two it was: "you are up to date" and "I could not find out" are different answers, and answering the second with the first is a lie by omission.

Methods

RunAsync(Func<Task<UpdateInfo?>>)

public static Task<(UpdateCheckState State, UpdateService.UpdateInfo? Info)> RunAsync(Func<Task<UpdateService.UpdateInfo?>> ask)

Parameters

ask Func<Task<UpdateService.UpdateInfo>>

Returns

Task<(UpdateCheckState State, UpdateService.UpdateInfo Info)>