Table of Contents

Class AvMetadata

Namespace
Uralstech.AvLoader

Information regarding a loaded model.

public class AvMetadata
Inheritance
object
AvMetadata

Constructors

AvMetadata(string)

public AvMetadata(string id)

Parameters

id string

Fields

AdditionalMetadata

Optional additional metadata for the avatar.

public Dictionary<string, string>? AdditionalMetadata

Field Value

Dictionary<string, string>

CreatedAt

The creation timestamp of the model.

public DateTimeOffset CreatedAt

Field Value

DateTimeOffset

Gender

The gender of the model or outfit it is wearing.

public AvGender Gender

Field Value

AvGender

Id

Unique ID of the avatar.

public string Id

Field Value

string

SkinTone

The skin tone of the model stored as a hex string (including the #).

public string? SkinTone

Field Value

string

Type

The type of the model.

public AvType Type

Field Value

AvType

UpdatedAt

The last time this model was updated.

public DateTimeOffset UpdatedAt

Field Value

DateTimeOffset

Methods

TryCreateFromBytes(ReadOnlySpan<byte>, out AvMetadata?, Encoding?, bool)

Tries creating a AvMetadata struct from raw bytes.

public static bool TryCreateFromBytes(ReadOnlySpan<byte> data, out AvMetadata? metadata, Encoding? encoding = null, bool throwOnFail = false)

Parameters

data ReadOnlySpan<byte>

The data to read from.

metadata AvMetadata

The decoded struct, null if decoding fails.

encoding Encoding

The encoding of the data. Assumes System.Text.Encoding.UTF8 if null.

throwOnFail bool

Should the method throw if it couldn't create the AvMetadata?

Returns

bool

true if successful; false otherwise.

TryCreateFromFile(string, out AvMetadata?, bool)

Tries creating a AvMetadata struct from a file.

public static bool TryCreateFromFile(string path, out AvMetadata? metadata, bool throwOnFail = false)

Parameters

path string

The path to read from.

metadata AvMetadata

The decoded struct, null if decoding fails.

throwOnFail bool

Should the method throw if it couldn't create the AvMetadata?

Returns

bool

true if successful; false otherwise.

TryCreateFromUriAsync(Uri, CancellationToken?, Encoding?, bool)

Tries creating a AvMetadata struct from data at the given URI.

public static Awaitable<AvMetadata?> TryCreateFromUriAsync(Uri uri, CancellationToken? token = null, Encoding? encoding = null, bool throwOnFail = false)

Parameters

uri Uri

The URI to load from.

token CancellationToken?
encoding Encoding

The encoding of the data. Assumes System.Text.Encoding.UTF8 if null.

throwOnFail bool

Should the method throw if it couldn't create the AvMetadata?

Returns

Awaitable<AvMetadata>

The decoded AvMetadata struct if successfull; null otherwise.