Table of Contents

Class PlatformReleaseManifest

Namespace
RDCore.SDK.Platform
Assembly
RDCore.SDK.Protocol.dll

The release manifest, release.json at the root of a released platform: what the release is, and what it was built with.

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

Remarks

RDCore's release workflow writes it into the platform, and publishes a copy beside the release's archive, as rdcore-<version>-<rid>.release.json. A development build has none. It is written in camelCase, and read regardless of case. This record holds what a client chooses a platform by; the manifest's other members, such as the list of its files, are not read.

Fields

FileName

The name of the release manifest at the platform root.

public const string FileName = "release.json"

Field Value

string

MaxBytes

The largest release manifest that is read, in bytes: 4 MiB, many times what a platform's list of files takes.

public const int MaxBytes = 4194304

Field Value

int

Properties

Commit

The commit the platform was built from.

public string? Commit { get; init; }

Property Value

string

Deployment

How the platform is deployed: framework-dependent, which needs Runtime on the machine.

public string? Deployment { get; init; }

Property Value

string

Name

The product released: RDCore.

public string Name { get; init; }

Property Value

string

Runtime

The .NET runtime the platform runs on.

public PlatformReleaseRuntime? Runtime { get; init; }

Property Value

PlatformReleaseRuntime

RuntimeIdentifier

The runtime identifier the platform was built for, such as win-x64 or osx-arm64: the manifest's rid.

[JsonPropertyName("rid")]
public string? RuntimeIdentifier { get; init; }

Property Value

string

Schema

The version of the manifest's format: 1.

public int Schema { get; init; }

Property Value

int

Sdk

The RDCore.SDK package the platform was built with.

public PlatformReleasePackage? Sdk { get; init; }

Property Value

PlatformReleasePackage

SdkVersion

The RDCore.SDK version the platform was built with, from Sdk; null when it names another package, or a version that is not one.

[JsonIgnore]
public PlatformVersion? SdkVersion { get; }

Property Value

PlatformVersion

Version

The version of the platform released, as its rdcore.json's platformVersion names it.

public string Version { get; init; }

Property Value

string

Methods

IsBuiltWith(PlatformVersion)

Whether the platform was built with an RDCore.SDK compatible with sdk, by IsCompatibleWith(PlatformVersion); false when the manifest does not say which one it was built with.

public bool IsBuiltWith(PlatformVersion sdk)

Parameters

sdk PlatformVersion

The RDCore.SDK version a client was built with, such as Version.

Returns

bool

Parse(ReadOnlySpan<byte>)

Reads a release manifest from its content.

public static PlatformReleaseManifest Parse(ReadOnlySpan<byte> utf8Json)

Parameters

utf8Json ReadOnlySpan<byte>

The manifest's content, in UTF-8.

Returns

PlatformReleaseManifest

Exceptions

InvalidDataException

The content is longer than MaxBytes, or not a release manifest.

Read(string)

Reads the release manifest of a platform root; null when it has none, as a development build has none.

public static PlatformReleaseManifest? Read(string platformRoot)

Parameters

platformRoot string

The platform root.

Returns

PlatformReleaseManifest

Exceptions

InvalidDataException

The manifest is longer than MaxBytes, or not a release manifest.

IOException

The manifest cannot be read.

UnauthorizedAccessException

The manifest cannot be read.