Class CilInstructionPattern.MatchNode
Represents a match node produced by a CilInstructionPattern.
public sealed record CilInstructionPattern.MatchNode : IMatchNode<CilInstruction>, IMatchNode, IEquatable<CilInstructionPattern.MatchNode>
- Inheritance
-
CilInstructionPattern.MatchNode
- Implements
- Inherited Members
Constructors
MatchNode(Pattern<CilInstruction>, CilInstruction, IMatchNode<CilOpCode>, IMatchNode<object?>)
Represents a match node produced by a CilInstructionPattern.
public MatchNode(Pattern<CilInstruction> Pattern, CilInstruction ConcreteValue, IMatchNode<CilOpCode> OpCode, IMatchNode<object?> Operand)
Parameters
PatternPattern<CilInstruction>ConcreteValueCilInstructionOpCodeIMatchNode<CilOpCode>OperandIMatchNode<object>
Properties
ConcreteValue
Gets the value that matched the pattern.
public CilInstruction ConcreteValue { get; init; }
Property Value
OpCode
public IMatchNode<CilOpCode> OpCode { get; init; }
Property Value
Operand
public IMatchNode<object?> Operand { get; init; }
Property Value
Pattern
Gets the pattern that was matched.
public Pattern<CilInstruction> Pattern { get; init; }
Property Value
Methods
Deconstruct(out Pattern<CilInstruction>, out CilInstruction, out IMatchNode<CilOpCode>, out IMatchNode<object?>)
public void Deconstruct(out Pattern<CilInstruction> Pattern, out CilInstruction ConcreteValue, out IMatchNode<CilOpCode> OpCode, out IMatchNode<object?> Operand)
Parameters
PatternPattern<CilInstruction>ConcreteValueCilInstructionOpCodeIMatchNode<CilOpCode>OperandIMatchNode<object>
Equals(MatchNode?)
public bool Equals(CilInstructionPattern.MatchNode? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetChildren()
Enumerates all child nodes of this match node.
public IEnumerable<(string Name, IMatchNode Match)> GetChildren()
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(MatchNode?, MatchNode?)
public static bool operator ==(CilInstructionPattern.MatchNode? left, CilInstructionPattern.MatchNode? right)
Parameters
Returns
operator !=(MatchNode?, MatchNode?)
public static bool operator !=(CilInstructionPattern.MatchNode? left, CilInstructionPattern.MatchNode? right)