Show / Hide Table of Contents

Interface IAsyncUnpacker<T>

Defines a series of methods to be implemented by a class that allows getting and extracting resources asynchronously.

Namespace: TheXDS.MCART.Resources
Assembly: MCART.dll
Syntax
public interface IAsyncUnpacker<T>
Type Parameters
Name Description
T

Type of resources to get.

Methods

| Edit this page View Source

TryUnpackAsync(string)

Tries to unpack a resource asyncronously, and returns a value that indicates either success or failure to unpack the requested resource.

Declaration
Task<UnpackResult<T>> TryUnpackAsync(string id)
Parameters
Type Name Description
string id

Resource id to be unpacked.

Returns
Type Description
Task<UnpackResult<T>>

A new UnpackResult<T> that indicates either success or failure to unpack the requested resource, as well as a reference to the unpacked resource if the extraction was successful.

| Edit this page View Source

TryUnpackAsync(string, ICompressorGetter)

Tries to unpack a resource asyncronously, and returns a value that indicates either success or failure to unpack the requested resource.

Declaration
Task<UnpackResult<T>> TryUnpackAsync(string id, ICompressorGetter compressor)
Parameters
Type Name Description
string id

Resource id to be unpacked.

ICompressorGetter compressor

Compressor getter instance to use.

Returns
Type Description
Task<UnpackResult<T>>

A new UnpackResult<T> that indicates either success or failure to unpack the requested resource, as well as a reference to the unpacked resource if the extraction was successful.

| Edit this page View Source

UnpackAsync(string)

Gets an identifiable resource asynchronously.

Declaration
Task<T> UnpackAsync(string id)
Parameters
Type Name Description
string id

Identifier of the resource.

Returns
Type Description
Task<T>

A resource of type T.

| Edit this page View Source

UnpackAsync(string, ICompressorGetter)

Extracts a compressed resource using the compressor with the specified identifier asynchronously.

Declaration
Task<T> UnpackAsync(string id, ICompressorGetter compressor)
Parameters
Type Name Description
string id

Identifier of the resource.

ICompressorGetter compressor

ICompressorGetter to use for extracting the resource.

Returns
Type Description
Task<T>

An uncompressed resource of type T.

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX