Table of Contents

Class LocalsPattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a LocalsPattern.

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

Constructors

MatchNode(Pattern<CilMethodBody?>, CilMethodBody, IMatchNode<bool>, IMatchNode<IList<CilLocalVariable>>)

Represents a match node produced by a LocalsPattern.

public MatchNode(Pattern<CilMethodBody?> Pattern, CilMethodBody ConcreteValue, IMatchNode<bool> InitializeLocals, IMatchNode<IList<CilLocalVariable>> Locals)

Parameters

Pattern Pattern<CilMethodBody>
ConcreteValue CilMethodBody
InitializeLocals IMatchNode<bool>
Locals IMatchNode<IList<CilLocalVariable>>

Properties

ConcreteValue

Gets the value that matched the pattern.

public CilMethodBody ConcreteValue { get; init; }

Property Value

CilMethodBody

InitializeLocals

public IMatchNode<bool> InitializeLocals { get; init; }

Property Value

IMatchNode<bool>

Locals

public IMatchNode<IList<CilLocalVariable>> Locals { get; init; }

Property Value

IMatchNode<IList<CilLocalVariable>>

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<bool>, out IMatchNode<IList<CilLocalVariable>>)

public void Deconstruct(out Pattern<CilMethodBody?> Pattern, out CilMethodBody ConcreteValue, out IMatchNode<bool> InitializeLocals, out IMatchNode<IList<CilLocalVariable>> Locals)

Parameters

Pattern Pattern<CilMethodBody>
ConcreteValue CilMethodBody
InitializeLocals IMatchNode<bool>
Locals IMatchNode<IList<CilLocalVariable>>

Equals(MatchNode?)

public bool Equals(LocalsPattern.MatchNode? other)

Parameters

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

Parameters

left LocalsPattern.MatchNode
right LocalsPattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left LocalsPattern.MatchNode
right LocalsPattern.MatchNode

Returns

bool