Resource Class
Represents a Win32 resource which can be loaded from and saved to a PE file.
Methods
Section titled “Methods”| Method | Description |
|---|---|
| Equals(obj) | Tests if type, name, and locale of this Resource object match another Resource object. |
| GetHashCode() | Gets a hash code for this Resource object. |
| Load(file) | Loads the resource data from a file. The file is searched for a resource with matching type, name, and locale. |
| Save(file) | Saves the resource to a file. Any existing resource data with matching type, name, and locale is overwritten. |
Properties
Section titled “Properties”| Property | Description |
|---|---|
| Data | Gets or sets the raw data of the resource. |
| Locale | Gets or sets the locale of the resource. |
| Name | Gets or sets the name of the resource. For a numeric resource identifier, the decimal number is prefixed with a ”#”. |
| ResourceType | Gets or sets the type of the resource. This may be one of the ResourceType constants or a user-defined type name. |
WixToolset.Dtf.Resources.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8 |
Equals(obj) Method
Section titled “Equals(obj) Method”Tests if type, name, and locale of this Resource object match another Resource object.
Declaration
Section titled “Declaration”public bool Equals( System.Object obj)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| obj | System.Object | Resource object to be compared |
Return value
Section titled “Return value”bool True if the objects represent the same resource; false otherwise.
GetHashCode() Method
Section titled “GetHashCode() Method”Gets a hash code for this Resource object.
Declaration
Section titled “Declaration”public int GetHashCode()Return value
Section titled “Return value”int Hash code generated from the resource type, name, and locale.
Load(file) Method
Section titled “Load(file) Method”Loads the resource data from a file. The file is searched for a resource with matching type, name, and locale.
Declaration
Section titled “Declaration”public void Load( string file)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| file | string | Win32 PE file containing the resource |
Save(file) Method
Section titled “Save(file) Method”Saves the resource to a file. Any existing resource data with matching type, name, and locale is overwritten.
Declaration
Section titled “Declaration”public void Save( string file)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| file | string | Win32 PE file to contain the resource |
Data Property
Section titled “Data Property”Gets or sets the raw data of the resource.
Declaration
Section titled “Declaration”public System.Byte[] Data { get; set; }Locale Property
Section titled “Locale Property”Gets or sets the locale of the resource.
Declaration
Section titled “Declaration”public int Locale { get; set; }Name Property
Section titled “Name Property”Gets or sets the name of the resource. For a numeric resource identifier, the decimal number is prefixed with a ”#”.
Declaration
Section titled “Declaration”public string Name { get; set; }ResourceType Property
Section titled “ResourceType Property”Gets or sets the type of the resource. This may be one of the ResourceType constants or a user-defined type name.
Declaration
Section titled “Declaration”public ResourceType ResourceType { get; set; }