Class ResourceData
- Namespace
 - AsmResolver.PE.Win32Resources
 
- Assembly
 - AsmResolver.PE.dll
 
Represents a single data entry in a Win32 resource directory.
public class ResourceData : IResourceEntry, IOwnedCollectionElement<ResourceDirectory>
  - Inheritance
 - 
      
      ResourceData
 
- Implements
 
- Derived
 
- Inherited Members
 
Constructors
ResourceData()
Initializes a new resource data entry.
protected ResourceData()
  ResourceData(string, ISegment)
Creates a new named data entry.
public ResourceData(string name, ISegment contents)
  Parameters
ResourceData(uint, ISegment)
Creates a new data entry defined by a numerical identifier..
public ResourceData(uint id, ISegment contents)
  Parameters
Properties
CanRead
Gets a value indicating whether the Contents is readable using a binary stream reader.
public bool CanRead { get; }
  Property Value
CodePage
Gets or sets the code page that is used to decode code point values within the resource data.
public uint CodePage { get; set; }
  Property Value
Remarks
Typically, the code page would be the Unicode code page.
Contents
Gets or sets the raw contents of the data entry.
public ISegment? Contents { get; set; }
  Property Value
Id
Gets or sets the ID of the entry.
public uint Id { get; set; }
  Property Value
Name
Gets or sets the name of the entry.
public string? Name { get; set; }
  Property Value
ParentDirectory
Gets the parent directory the entry is stored in.
public ResourceDirectory? ParentDirectory { get; }
  Property Value
Methods
CreateReader()
Creates a new binary stream reader that reads the raw contents of the resource file.
public BinaryStreamReader CreateReader()
  Returns
- BinaryStreamReader
 The reader.
GetContents()
Obtains the contents of the data entry.
protected virtual ISegment? GetContents()
  Returns
- ISegment
 The contents.
Remarks
This method is called upon initializing the value for the Contents property.
ToString()
Returns a string that represents the current object.
public override string ToString()
  Returns
- string
 A string that represents the current object.