NativeOperand
Namespace: Dotsider.Core.Analysis.Models
Assembly: Dotsider.Core.dll
One decoded operand of a NativeInstruction, carried structurally so navigation, JSON/MCP output, syntax decoration, and future diffing never parse the rendered text. The Text is the display projection; the typed fields describe what it renders.
public sealed record NativeOperand : IEquatable<NativeOperand>Inheritance
Section titled “Inheritance”Object → NativeOperand
Implements
Section titled “Implements”Constructors
Section titled “Constructors”NativeOperand(NativeOperandKind, string, string?, long?, string?, string?, int, long, bool)
Section titled “NativeOperand(NativeOperandKind, string, string?, long?, string?, string?, int, long, bool)”One decoded operand of a NativeInstruction, carried structurally so navigation, JSON/MCP output, syntax decoration, and future diffing never parse the rendered text. The Text is the display projection; the typed fields describe what it renders.
Parameters:
Kind(NativeOperandKind): The operand’s kind.Text(String): The rendered operand text (e.g.rax,0x10,[rbp-0x8],zmm1{k1}{z}).Register(String): The register name when Kind is Register, else null.Immediate(Nullable<Int64>): The immediate value when Kind is Immediate, else null.MemoryBase(String): The base register of a memory reference, or null.MemoryIndex(String): The index register of a memory reference, or null.MemoryScale(Int32): The index scale (1/2/4/8) of a memory reference, or 0 when there is no index.MemoryDisplacement(Int64): The displacement of a memory reference, or 0.IsRipRelative(Boolean): Whether a memory reference is x64 RIP-relative (the displacement is off the next instruction).
public NativeOperand(NativeOperandKind Kind, string Text, string? Register = null, long? Immediate = null, string? MemoryBase = null, string? MemoryIndex = null, int MemoryScale = 0, long MemoryDisplacement = 0, bool IsRipRelative = false)Properties
Section titled “Properties”Immediate
Section titled “Immediate”The immediate value when Kind is Immediate, else null.
Returns: Nullable<Int64>
public long? Immediate { get; init; }IsRipRelative
Section titled “IsRipRelative”Whether a memory reference is x64 RIP-relative (the displacement is off the next instruction).
Returns: Boolean
public bool IsRipRelative { get; init; }The operand’s kind.
Returns: NativeOperandKind
public NativeOperandKind Kind { get; init; }MemoryBase
Section titled “MemoryBase”The base register of a memory reference, or null.
Returns: String
public string? MemoryBase { get; init; }MemoryDisplacement
Section titled “MemoryDisplacement”The displacement of a memory reference, or 0.
Returns: Int64
public long MemoryDisplacement { get; init; }MemoryIndex
Section titled “MemoryIndex”The index register of a memory reference, or null.
Returns: String
public string? MemoryIndex { get; init; }MemoryScale
Section titled “MemoryScale”The index scale (1/2/4/8) of a memory reference, or 0 when there is no index.
Returns: Int32
public int MemoryScale { get; init; }Register
Section titled “Register”The register name when Kind is Register, else null.
Returns: String
public string? Register { get; init; }The rendered operand text (e.g. rax, 0x10, [rbp-0x8], zmm1{k1}{z}).
Returns: String
public string Text { get; init; }Methods
Section titled “Methods”Deconstruct(out NativeOperandKind, out string, out string?, out long?, out string?, out string?, out int, out long, out bool)
Section titled “Deconstruct(out NativeOperandKind, out string, out string?, out long?, out string?, out string?, out int, out long, out bool)”Parameters:
Kind(NativeOperandKind)Text(String)Register(String)Immediate(Nullable<Int64>)MemoryBase(String)MemoryIndex(String)MemoryScale(Int32)MemoryDisplacement(Int64)IsRipRelative(Boolean)
public void Deconstruct(out NativeOperandKind Kind, out string Text, out string? Register, out long? Immediate, out string? MemoryBase, out string? MemoryIndex, out int MemoryScale, out long MemoryDisplacement, out bool IsRipRelative)Equals(NativeOperand?)
Section titled “Equals(NativeOperand?)”Parameters:
other(NativeOperand)
Returns: Boolean
public bool Equals(NativeOperand? other)Equals(object?)
Section titled “Equals(object?)”Parameters:
obj(Object)
Returns: Boolean
public override bool Equals(object? obj)GetHashCode()
Section titled “GetHashCode()”Returns: Int32
public override int GetHashCode()ToString()
Section titled “ToString()”Returns: String
public override string ToString()Members
Section titled “Members”operator !=(NativeOperand?, NativeOperand?)
Section titled “operator !=(NativeOperand?, NativeOperand?)”Parameters:
left(NativeOperand)right(NativeOperand)
Returns: Boolean
public static bool operator !=(NativeOperand? left, NativeOperand? right)operator ==(NativeOperand?, NativeOperand?)
Section titled “operator ==(NativeOperand?, NativeOperand?)”Parameters:
left(NativeOperand)right(NativeOperand)
Returns: Boolean
public static bool operator ==(NativeOperand? left, NativeOperand? right)