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 SourceTryUnpackAsync(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. |
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. |
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 |
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 |