Interface IUnpacker<T>
Defines a series of methods to be implemented by a class that allows getting and extracting resources.
Namespace: TheXDS.MCART.Resources
Assembly: MCART.dll
Syntax
public interface IUnpacker<T>
Type Parameters
Name | Description |
---|---|
T | Type of resources to get. |
Methods
| Edit this page View SourceTryUnpack(string, ICompressorGetter, out T)
Tries to get an identifiable resource.
Declaration
bool TryUnpack(string id, ICompressorGetter compressor, out T result)
Parameters
Type | Name | Description |
---|---|---|
string | id | Identifier of the resource. |
ICompressorGetter | compressor | ICompressorGetter to use for extracting the resource. |
T | result | Out parameter. A resource of type
|
Returns
Type | Description |
---|---|
bool | true if the resource was successfully extracted, false otherwise. |
TryUnpack(string, out T)
Tries to get an identifiable resource.
Declaration
bool TryUnpack(string id, out T result)
Parameters
Type | Name | Description |
---|---|---|
string | id | Identifier of the resource. |
T | result | Out parameter. A resource of type
|
Returns
Type | Description |
---|---|
bool | true if the resource was successfully extracted, false otherwise. |
Unpack(string)
Gets an identifiable resource.
Declaration
T Unpack(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | Identifier of the resource. |
Returns
Type | Description |
---|---|
T | A resource of type |
Unpack(string, ICompressorGetter)
Extracts a compressed resource using the compressor with the specified identifier.
Declaration
T Unpack(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 |
---|---|
T | An uncompressed resource of type |