Class Unpacker
AssemblyUnpacker<T> that exposes directly the Stream of the embedded resources of an assembly.
Inherited Members
Namespace: TheXDS.MCART.Resources
Assembly: MCART.dll
Syntax
public class Unpacker : AssemblyUnpacker<Stream>, IUnpacker<Stream>
Constructors
| Edit this page View SourceUnpacker(Assembly, string)
AssemblyUnpacker<T> that exposes directly the Stream of the embedded resources of an assembly.
Declaration
public Unpacker(Assembly assembly, string path)
Parameters
Type | Name | Description |
---|---|---|
Assembly | assembly | The Assembly from which the embedded resources will be extracted. |
string | path | The path (in namespace format) where the embedded resources will be located. |
Unpacker(string)
Initializes a new instance of the Unpacker, searching for the resources to extract in the assembly from which this instance is created.
Declaration
public Unpacker(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path (in namespace format) where the embedded resources will be located. |
Unpacker(Type)
Initializes a new instance of the Unpacker, searching for the resources to extract in the assembly that declares the specified type, also using it as the path reference (in namespace format) to search for the embedded resources.
Declaration
public Unpacker(Type resReference)
Parameters
Type | Name | Description |
---|---|---|
Type | resReference | Type to take as a reference for the location of the resources. |
Methods
| Edit this page View SourceUnpack(string)
Gets a resource identifiable by its ID.
Declaration
public override Stream Unpack(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The identifier of the resource. |
Returns
Type | Description |
---|---|
Stream | A Stream from which the embedded resource can be read. |
Overrides
| Edit this page View SourceUnpack(string, ICompressorGetter?)
Extracts a compressed resource using the compressor with the specified identifier.
Declaration
public override Stream Unpack(string id, ICompressorGetter? compressor)
Parameters
Type | Name | Description |
---|---|---|
string | id | The identifier of the resource. |
ICompressorGetter | compressor | The ICompressorGetter to use for extracting the resource. |
Returns
Type | Description |
---|---|
Stream | A Stream from which the embedded resource can be read uncompressed. |