Class AvMetadata
Information regarding a loaded model.
public class AvMetadata
- Inheritance
-
objectAvMetadata
Constructors
AvMetadata(string)
public AvMetadata(string id)
Parameters
idstring
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
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
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
dataReadOnlySpan<byte>The data to read from.
metadataAvMetadataThe decoded struct, null if decoding fails.
encodingEncodingThe encoding of the data. Assumes System.Text.Encoding.UTF8 if null.
throwOnFailboolShould the method throw if it couldn't create the AvMetadata?
Returns
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
pathstringThe path to read from.
metadataAvMetadataThe decoded struct, null if decoding fails.
throwOnFailboolShould the method throw if it couldn't create the AvMetadata?
Returns
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
uriUriThe URI to load from.
tokenCancellationToken?encodingEncodingThe encoding of the data. Assumes System.Text.Encoding.UTF8 if null.
throwOnFailboolShould the method throw if it couldn't create the AvMetadata?
Returns
- Awaitable<AvMetadata>
The decoded AvMetadata struct if successfull; null otherwise.