Table of Contents

Class FlatBodyPattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a FlatBodyPattern.

public sealed record FlatBodyPattern.MatchNode : IMatchNode<CilMethodBody?>, IMatchNode, IEquatable<FlatBodyPattern.MatchNode>
Inheritance
FlatBodyPattern.MatchNode
Implements
Inherited Members

Constructors

MatchNode(Pattern<CilMethodBody?>, CilMethodBody, IMatchNode<IList<CilInstruction>>)

Represents a match node produced by a FlatBodyPattern.

public MatchNode(Pattern<CilMethodBody?> Pattern, CilMethodBody ConcreteValue, IMatchNode<IList<CilInstruction>> Instructions)

Parameters

Pattern Pattern<CilMethodBody>
ConcreteValue CilMethodBody
Instructions IMatchNode<IList<CilInstruction>>

Properties

ConcreteValue

Gets the value that matched the pattern.

public CilMethodBody ConcreteValue { get; init; }

Property Value

CilMethodBody

Instructions

public IMatchNode<IList<CilInstruction>> Instructions { get; init; }

Property Value

IMatchNode<IList<CilInstruction>>

Pattern

Gets the pattern that was matched.

public Pattern<CilMethodBody?> Pattern { get; init; }

Property Value

Pattern<CilMethodBody>

Methods

Deconstruct(out Pattern<CilMethodBody?>, out CilMethodBody, out IMatchNode<IList<CilInstruction>>)

public void Deconstruct(out Pattern<CilMethodBody?> Pattern, out CilMethodBody ConcreteValue, out IMatchNode<IList<CilInstruction>> Instructions)

Parameters

Pattern Pattern<CilMethodBody>
ConcreteValue CilMethodBody
Instructions IMatchNode<IList<CilInstruction>>

Equals(MatchNode?)

public bool Equals(FlatBodyPattern.MatchNode? other)

Parameters

other FlatBodyPattern.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 ==(FlatBodyPattern.MatchNode? left, FlatBodyPattern.MatchNode? right)

Parameters

left FlatBodyPattern.MatchNode
right FlatBodyPattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left FlatBodyPattern.MatchNode
right FlatBodyPattern.MatchNode

Returns

bool