Class BytesPatch
- Namespace
- AsmResolver.Patching
- Assembly
- AsmResolver.dll
Patches an instance of ISegment with a sequence of bytes.
public sealed class BytesPatch : IPatch
- Inheritance
-
BytesPatch
- Implements
- Inherited Members
Constructors
BytesPatch(uint, byte[])
Creates a new bytes patch.
public BytesPatch(uint relativeOffset, byte[] newData)
Parameters
Properties
NewData
Gets the data to write.
public byte[] NewData { get; }
Property Value
- byte[]
RelativeOffset
Gets the offset relative to the start of the segment to start writing at.
public uint RelativeOffset { get; }
Property Value
Methods
Apply(in PatchContext)
Applies the patch.
public void Apply(in PatchContext context)
Parameters
context
PatchContextThe context in which to
UpdateOffsets(in RelocationParameters)
Assigns a new file and virtual offset to the segment and all its sub-components.
public void UpdateOffsets(in RelocationParameters parameters)
Parameters
parameters
RelocationParametersThe parameters containing the new offset information for the segment.