Class SegmentPatch
- Namespace
- AsmResolver.Patching
- Assembly
- AsmResolver.dll
Patches an instance of ISegment with the contents of a file segment.
public class SegmentPatch : IPatch
- Inheritance
-
SegmentPatch
- Implements
- Inherited Members
Constructors
SegmentPatch(uint, ISegment)
Creates a new segment patch.
public SegmentPatch(uint relativeOffset, ISegment segment)
Parameters
Properties
RelativeOffset
Gets the offset relative to the start of the segment to start writing at.
public uint RelativeOffset { get; }
Property Value
Segment
Gets the data to write.
public ISegment Segment { 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.