Table of Contents

Class CilInstructionPattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

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

Pattern Pattern<CilInstruction>
ConcreteValue CilInstruction
OpCode IMatchNode<CilOpCode>
Operand IMatchNode<object>

Properties

ConcreteValue

Gets the value that matched the pattern.

public CilInstruction ConcreteValue { get; init; }

Property Value

CilInstruction

OpCode

public IMatchNode<CilOpCode> OpCode { get; init; }

Property Value

IMatchNode<CilOpCode>

Operand

public IMatchNode<object?> Operand { get; init; }

Property Value

IMatchNode<object>

Pattern

Gets the pattern that was matched.

public Pattern<CilInstruction> Pattern { get; init; }

Property Value

Pattern<CilInstruction>

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

Pattern Pattern<CilInstruction>
ConcreteValue CilInstruction
OpCode IMatchNode<CilOpCode>
Operand IMatchNode<object>

Equals(MatchNode?)

public bool Equals(CilInstructionPattern.MatchNode? other)

Parameters

other CilInstructionPattern.MatchNode

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetChildren()

Enumerates all child nodes of this match node.

public IEnumerable<(string Name, IMatchNode Match)> GetChildren()

Returns

IEnumerable<(string Name, IMatchNode Match)>

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(MatchNode?, MatchNode?)

public static bool operator ==(CilInstructionPattern.MatchNode? left, CilInstructionPattern.MatchNode? right)

Parameters

left CilInstructionPattern.MatchNode
right CilInstructionPattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

public static bool operator !=(CilInstructionPattern.MatchNode? left, CilInstructionPattern.MatchNode? right)

Parameters

left CilInstructionPattern.MatchNode
right CilInstructionPattern.MatchNode

Returns

bool