Table of Contents

Interface IModel

Namespace
LlamaLogic.Packages.Models
Assembly
LlamaLogic.Packages.dll

Represents a model for a resource

public interface IModel

Properties

ResourceName

Gets the name of this resource if it has one

string? ResourceName { get; }

Property Value

string

SupportedTypes

Gets a list of resource types that this model supports

public static abstract ISet<ResourceType> SupportedTypes { get; }

Property Value

ISet<ResourceType>

Methods

Encode()

Encodes the resource model into raw format (🔄️🏃)

ReadOnlyMemory<byte> Encode()

Returns

ReadOnlyMemory<byte>

GetName(Stream)

Gets the name of a resource from its raw data, if it has one (🔄️💤)

public static abstract string? GetName(Stream stream)

Parameters

stream Stream

Returns

string

GetNameAsync(Stream, CancellationToken)

Gets the name of a resource from its raw data, if it has one, asynchronously (🔄️💤)

public static abstract Task<string?> GetNameAsync(Stream stream, CancellationToken cancellationToken = default)

Parameters

stream Stream
cancellationToken CancellationToken

Returns

Task<string>