Skip to content

PublicRepoManifest

Namespace Nfty.Core.Publish.Community in assembly Nfty.Core.

public sealed record PublicRepoManifest : ISchemaVersioned

The nfty-public.json an owner's repository carries: what that account shares.

Constructors

PublicRepoManifest(int, IReadOnlyList<CommunityEntry>)

public PublicRepoManifest(int SchemaVersion, IReadOnlyList<CommunityEntry> Shares);

Parameters

  • SchemaVersion (int) - The schema this file was written against.
  • Shares (IReadOnlyList<CommunityEntry>) - The account's entries.

Properties

SchemaVersion

public int SchemaVersion { get; init; }

The schema this file was written against.

Shares

public IReadOnlyList<CommunityEntry> Shares { get; init; }

The account's entries.

Methods

Read(Stream)

public static PublicRepoManifest Read(Stream stream);

Reads the file, refusing a newer schema by name.

Parameters

  • stream (Stream) - The JSON.

Returns. The manifest read.

Write(PublicRepoManifest)

public static byte[] Write(PublicRepoManifest manifest);

Writes the file in the order given.

Parameters

  • manifest (PublicRepoManifest) - The manifest.

Returns. The manifest as UTF-8 JSON, shares in the order given.