Table of Contents

Class Model

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

Represents a model for a raw resource

public abstract class Model : IModel
Inheritance
Model
Implements
Derived
Inherited Members

Properties

ResourceName

Gets the name of this resource if it has one

public abstract string? ResourceName { get; }

Property Value

string

SupportedTypes

Gets a list of resource types that this model supports

public static ISet<ResourceType> SupportedTypes { get; }

Property Value

ISet<ResourceType>

Methods

Encode()

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

public abstract ReadOnlyMemory<byte> Encode()

Returns

ReadOnlyMemory<byte>

GetName(ResourceType, Stream)

Gets the name of a resource from its raw data, if it has one

public static string? GetName(ResourceType type, Stream stream)

Parameters

type ResourceType
stream Stream

Returns

string

GetName(Stream)

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

public static string? GetName(Stream stream)

Parameters

stream Stream

Returns

string

GetNameAsync(ResourceType, Stream, CancellationToken)

Gets the name of a resource from its raw data, if it has one

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

Parameters

type ResourceType
stream Stream
cancellationToken CancellationToken

Returns

Task<string>

GetNameAsync(Stream, CancellationToken)

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

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

Parameters

stream Stream
cancellationToken CancellationToken

Returns

Task<string>