Table of Contents

Interface IAvDataLoader

Namespace
Uralstech.AvLoader

Interface for an avatar data loader.

public interface IAvDataLoader

Remarks

The role of the IAvDataLoader is to fetch the raw binary and JSON data associated with the avatar. They can be chained up to create fallbacks, for example, a FileAvDataLoader could check local caches for existing avatars, then fall back to a URIAvDataLoader to download it from remote sources.

You could also implement your own data loaders to load avatars using APIs provided by cloud services, like Firebase.

Methods

LoadAvatarAsync(bool, CancellationToken)

Tries loading an avatar into an AvSourceData.

Awaitable<AvSourceData?> LoadAvatarAsync(bool throwOnFail, CancellationToken token = default)

Parameters

throwOnFail bool

Should this method throw errors on failures or log them as warnings and return null?

token CancellationToken

Returns

Awaitable<AvSourceData>

The loaded data if successful; null on failure.