Pkg.DotNETManifestResources
— API for parsing .NET manifest resources¶
Overview¶
The Pkg.DotNETManifestResources
module contains the API for parsing .NET manifest resources.
Module API¶
Pkg.DotNETManifestResources module API.
Classes:
This class contains information about a resource entry.
Attributes:
Boolean resource type.
Byte resource type.
Byte-array resource type.
Character resource type.
Date-time resource type.
Decimal resource type.
Double resource type.
16-bit integer resource type.
32-bit integer resource type.
64-bit integer resource type.
Last primitive resource type.
Null resource type.
Signed byte resource type.
Float resource type.
Stream resource type.
String resource type.
Time-span resource type.
Unsigned 16-bit integer resource type.
Unsigned 32-bit integer resource type.
Unsigned 64-bit integer resource type.
User resource types.
- class DotNETManifestResourceInfo¶
This class contains information about a resource entry.
See also
DotNETManifestResourcesObject.GetResourceInfo()
.Methods:
TypeName
()Returns the name of the resource type if known; otherwise returns an empty string.
Attributes:
The data offset of the resource.
The data size of the resource.
The name of the resource.
The offset of the resource.
The resource value offset.
The resource value size.
The size of the resource.
The resource type (e.g.,
MANRES_TYPE_BYTE_ARRAY
).
- TypeName() → str¶
- Returns
Returns the name of the resource type if known; otherwise returns an empty string.
- Return type
str
- data_offset¶
The data offset of the resource.
- data_size¶
The data size of the resource.
- name¶
The name of the resource.
- offset¶
The offset of the resource.
- resource_offset¶
The resource value offset.
- resource_size¶
The resource value size.
- size¶
The size of the resource.
- type¶
The resource type (e.g.,
MANRES_TYPE_BYTE_ARRAY
).
- class DotNETManifestResourcesObject¶
Bases:
Pro.Core.CFFObject
Methods:
Retrieves the raw resource data, which includes the information about the resource.
Returns the number of resources.
Retrieves the resource data.
Retrieves information about a resource.
Retrieves the name of a resource.
GetResourceValue
(i[, preview])Retrieves the resource value.
GetResourceValueString
(i[, preview])Retrieves the resource value as string.
Parse
([wo])Parses the format.
- GetRawResourceData(i: Union[int, Pkg.DotNETManifestResources.DotNETManifestResourceInfo]) → Pro.Core.NTContainer¶
Retrieves the raw resource data, which includes the information about the resource.
- Parameters
i (Union[int, DotNETManifestResourceInfo]) – Either the resource index or the resource information.
- Returns
Returns the data if successful; otherwise returns an invalid container instance.
- Return type
See also
GetResourceData()
andGetResourceInfo()
.
- GetResourceCount() → int¶
- Returns
Returns the number of resources.
- Return type
int
See also
GetResourceInfo()
.
- GetResourceData(i: Union[int, Pkg.DotNETManifestResources.DotNETManifestResourceInfo]) → Pro.Core.NTContainer¶
Retrieves the resource data.
- Parameters
i (Union[int, DotNETManifestResourceInfo]) – Either the resource index or the resource information.
- Returns
Returns the data if successful; otherwise returns an invalid container instance.
- Return type
See also
GetRawResourceData()
andGetResourceInfo()
.
- GetResourceInfo(i: int) → Optional[Pkg.DotNETManifestResources.DotNETManifestResourceInfo]¶
Retrieves information about a resource.
- Parameters
i (int) – The resource index.
- Returns
Returns the resource information if successful; otherwise returns
None
.- Return type
Optional[DotNETManifestResourceInfo]
See also
GetResourceCount()
andGetResourceData()
.
- GetResourceName(i: int) → str¶
Retrieves the name of a resource.
- Parameters
i (int) – The resource index.
- Returns
Returns the name if successful; otherwise returns an empty string.
- Return type
str
See also
GetResourceCount()
.
- GetResourceValue(i: Union[int, Pkg.DotNETManifestResources.DotNETManifestResourceInfo], preview: bool = False) → Any¶
Retrieves the resource value.
- Parameters
i (Union[int, DotNETManifestResourceInfo]) – Either the resource index or the resource information.
preview (bool) – If
True
and the resource contains a large amount of data, only a chunk of the data will be returned; otherwise the entire data is returned.- Returns
Returns the value if successful; otherwise returns
None
.- Return type
Any
See also
GetResourceValueString()
andGetResourceCount()
.
- GetResourceValueString(i: Union[int, Pkg.DotNETManifestResources.DotNETManifestResourceInfo], preview: bool = False) → str¶
Retrieves the resource value as string.
- Parameters
i (Union[int, DotNETManifestResourceInfo]) – Either the resource index or the resource information.
preview (bool) – If
True
and the resource contains a large amount of data, only a chunk of the data will be returned; otherwise the entire data is returned.- Returns
Returns the value as string if successful; otherwise returns an empty string.
- Return type
Any
See also
GetResourceValue()
andGetResourceCount()
.
- Parse(wo: Optional[Pro.Core.NTIWait] = None) → bool¶
Parses the format.
- Parameters
wo (NTIWait) – An optional wait object for the parsing process.
- Returns
Returns
True
if successful; otherwise returnsFalse
.- Return type
bool
- MANRES_TYPE_BOOLEAN¶
Boolean resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_BYTE¶
Byte resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_BYTE_ARRAY¶
Byte-array resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_CHAR¶
Character resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_DATE_TIME¶
Date-time resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_DECIMAL¶
Decimal resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_DOUBLE¶
Double resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_INT16¶
16-bit integer resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_INT32¶
32-bit integer resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_INT64¶
64-bit integer resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_LAST_PRIMITIVE¶
Last primitive resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_NULL¶
Null resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_SBYTE¶
Signed byte resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_SINGLE¶
Float resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_STREAM¶
Stream resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_STRING¶
String resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_TIME_SPAN¶
Time-span resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_UINT16¶
Unsigned 16-bit integer resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_UINT32¶
Unsigned 32-bit integer resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_UINT64¶
Unsigned 64-bit integer resource type.
See also
DotNETManifestResourceInfo.type
.
- MANRES_TYPE_USER_TYPES¶
User resource types.
See also
DotNETManifestResourceInfo.type
.