Table of Contents

Class InstallResult

Namespace
FishMMO.Installer
Assembly
FishMMO-Installer.dll

Result of a single component installation operation.

public sealed record InstallResult : IEquatable<InstallResult>
Inheritance
InstallResult
Implements
Inherited Members

Properties

ComponentName

Component name (e.g. "postgresql", "nginx").

public string ComponentName { get; init; }

Property Value

string

Duration

Wall-clock duration of the installation.

public TimeSpan Duration { get; init; }

Property Value

TimeSpan

ErrorMessage

Error message when Success is false.

public string? ErrorMessage { get; init; }

Property Value

string

Success

True if the component installation succeeded.

public bool Success { get; init; }

Property Value

bool

Methods

Fail(string, string?, TimeSpan?)

Creates a failure result.

public static InstallResult Fail(string componentName, string? errorMessage = null, TimeSpan? duration = null)

Parameters

componentName string
errorMessage string
duration TimeSpan?

Returns

InstallResult

Ok(string, TimeSpan?)

Creates a successful result.

public static InstallResult Ok(string componentName, TimeSpan? duration = null)

Parameters

componentName string
duration TimeSpan?

Returns

InstallResult

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.