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