Table of Contents

Class AppVersionInfo

Namespace
Garyon.Objects
Assembly
Garyon.dll

Provides version information about the application, usually parsed from AssemblyInformationalVersionAttribute.

public sealed record AppVersionInfo : IEquatable<AppVersionInfo>
Inheritance
AppVersionInfo
Implements
Inherited Members
Extension Methods

Constructors

AppVersionInfo(string, string?, string?)

Provides version information about the application, usually parsed from AssemblyInformationalVersionAttribute.

public AppVersionInfo(string Version, string? PreviewIndicator, string? CommitSha)

Parameters

Version string

The main part of the informational version. Assuming a version like '1.2.3-preview', the main version is the '1.2.3' part.

PreviewIndicator string

The optional preview indicator that follows the version string. Assuming a version like '1.2.3-preview', the preview indicator is the 'preview' part.

CommitSha string

The SHA of the commit that built the application, if available.

Properties

CommitSha

The SHA of the commit that built the application, if available.

public string? CommitSha { get; init; }

Property Value

string

PreviewIndicator

The optional preview indicator that follows the version string. Assuming a version like '1.2.3-preview', the preview indicator is the 'preview' part.

public string? PreviewIndicator { get; init; }

Property Value

string

Version

The main part of the informational version. Assuming a version like '1.2.3-preview', the main version is the '1.2.3' part.

public string Version { get; init; }

Property Value

string

Methods

InformationalVersionForAssembly(Assembly)

public static AppVersionInfo? InformationalVersionForAssembly(Assembly assembly)

Parameters

assembly Assembly

Returns

AppVersionInfo

Parse(AssemblyInformationalVersionAttribute)

public static AppVersionInfo Parse(AssemblyInformationalVersionAttribute attribute)

Parameters

attribute AssemblyInformationalVersionAttribute

Returns

AppVersionInfo

Parse(string)

public static AppVersionInfo Parse(string versionString)

Parameters

versionString string

Returns

AppVersionInfo