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
SupportedTypes
Gets a list of resource types that this model supports
public static abstract ISet<ResourceType> SupportedTypes { get; }
Property Value
Methods
Encode()
Encodes the resource model into raw format (🔄️🏃)
ReadOnlyMemory<byte> Encode()
Returns
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
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
StreamcancellationToken
CancellationToken