Skip to content

CommunityEntry

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

public sealed record CommunityEntry : ISchemaVersioned

One shared collection as the gallery lists it.

Constructors

CommunityEntry(int, string, CommunityOwner, string, string, string, string, string, IReadOnlyList<string>, CommunityCanvas, int, bool, bool, string?, CommunityFile, CommunityFile, string, string, DateTimeOffset, DateTimeOffset)

public CommunityEntry(int SchemaVersion, string Slug, CommunityOwner Owner, string Repo, string Release, string Name, string Collection, string Description, IReadOnlyList<string> Tags, CommunityCanvas Canvas, int Assets, bool Models, bool IncludesCookBook, string? CookbookSha256, CommunityFile Set, CommunityFile Preview, string Fingerprint, string NftyVersion, DateTimeOffset Created, DateTimeOffset Updated);

Parameters

  • SchemaVersion (int) - The schema this entry was written against.
  • Slug (string) - The share's name within its owner's account.
  • Owner (CommunityOwner) - Who shares it.
  • Repo (string) - The owner's repository holding the files.
  • Release (string) - The release tag holding the files.
  • Name (string) - The share's display name.
  • Collection (string) - The collection name the Set publishes.
  • Description (string) - A short description.
  • Tags (IReadOnlyList<string>) - Gallery tags.
  • Canvas (CommunityCanvas) - The canvas size.
  • Assets (int) - How many assets the Set holds.
  • Models (bool) - Whether the Set carries 3D models.
  • IncludesCookBook (bool) - Whether the source CookBook is inside.
  • CookbookSha256 (string?) - The source CookBook's hash, when known.
  • Set (CommunityFile) - The packed Set.
  • Preview (CommunityFile) - The preview picture.
  • Fingerprint (string) - Hash of what the Set shows, used to spot the same Set shared twice.
  • NftyVersion (string) - The nfty version that made the share.
  • Created (DateTimeOffset) - When it was first shared.
  • Updated (DateTimeOffset) - When it was last updated.

Properties

Assets

public int Assets { get; init; }

How many assets the Set holds.

Canvas

public CommunityCanvas Canvas { get; init; }

The canvas size.

Collection

public string Collection { get; init; }

The collection name the Set publishes.

CookbookSha256

public string? CookbookSha256 { get; init; }

The source CookBook's hash, when known.

Created

public DateTimeOffset Created { get; init; }

When it was first shared.

Description

public string Description { get; init; }

A short description.

Fingerprint

public string Fingerprint { get; init; }

Hash of what the Set shows, used to spot the same Set shared twice.

Id

public string Id { get; }

The entry's identity in the gallery: owner id and slug.

IncludesCookBook

public bool IncludesCookBook { get; init; }

Whether the source CookBook is inside.

Models

public bool Models { get; init; }

Whether the Set carries 3D models.

Name

public string Name { get; init; }

The share's display name.

NftyVersion

public string NftyVersion { get; init; }

The nfty version that made the share.

Owner

public CommunityOwner Owner { get; init; }

Who shares it.

Preview

public CommunityFile Preview { get; init; }

The preview picture.

Release

public string Release { get; init; }

The release tag holding the files.

Repo

public string Repo { get; init; }

The owner's repository holding the files.

SchemaVersion

public int SchemaVersion { get; init; }

The schema this entry was written against.

Set

public CommunityFile Set { get; init; }

The packed Set.

Slug

public string Slug { get; init; }

The share's name within its owner's account.

Tags

public IReadOnlyList<string> Tags { get; init; }

Gallery tags.

Updated

public DateTimeOffset Updated { get; init; }

When it was last updated.

Methods

SameShare(CommunityEntry, CommunityEntry)

public static bool SameShare(CommunityEntry a, CommunityEntry b);

True when every shared field is equal; CommunityEntry.Updated is ignored and CommunityEntry.Tags compare as a sequence.

Parameters

  • a (CommunityEntry) - One entry.
  • b (CommunityEntry) - The other.

Returns. True when the two entries share the same fields.