Table of Contents

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

relativeOffset uint

The offset to start writing at.

segment ISegment

The new segment.

Properties

RelativeOffset

Gets the offset relative to the start of the segment to start writing at.

public uint RelativeOffset { get; }

Property Value

uint

Segment

Gets the data to write.

public ISegment Segment { get; }

Property Value

ISegment

Methods

Apply(in PatchContext)

Applies the patch.

public void Apply(in PatchContext context)

Parameters

context PatchContext

The 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 RelocationParameters

The parameters containing the new offset information for the segment.