Table of Contents

Class LocalPattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a LocalPattern.

public sealed record LocalPattern.MatchNode : IMatchNode<CilLocalVariable>, IMatchNode, IEquatable<LocalPattern.MatchNode>
Inheritance
LocalPattern.MatchNode
Implements
Inherited Members

Constructors

MatchNode(Pattern<CilLocalVariable>, CilLocalVariable, IMatchNode<int>, IMatchNode<TypeSignature?>)

Represents a match node produced by a LocalPattern.

public MatchNode(Pattern<CilLocalVariable> Pattern, CilLocalVariable ConcreteValue, IMatchNode<int> Index, IMatchNode<TypeSignature?> VariableType)

Parameters

Pattern Pattern<CilLocalVariable>
ConcreteValue CilLocalVariable
Index IMatchNode<int>
VariableType IMatchNode<TypeSignature>

Properties

ConcreteValue

Gets the value that matched the pattern.

public CilLocalVariable ConcreteValue { get; init; }

Property Value

CilLocalVariable

Index

public IMatchNode<int> Index { get; init; }

Property Value

IMatchNode<int>

Pattern

Gets the pattern that was matched.

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

Property Value

Pattern<CilLocalVariable>

VariableType

public IMatchNode<TypeSignature?> VariableType { get; init; }

Property Value

IMatchNode<TypeSignature>

Methods

Deconstruct(out Pattern<CilLocalVariable>, out CilLocalVariable, out IMatchNode<int>, out IMatchNode<TypeSignature?>)

public void Deconstruct(out Pattern<CilLocalVariable> Pattern, out CilLocalVariable ConcreteValue, out IMatchNode<int> Index, out IMatchNode<TypeSignature?> VariableType)

Parameters

Pattern Pattern<CilLocalVariable>
ConcreteValue CilLocalVariable
Index IMatchNode<int>
VariableType IMatchNode<TypeSignature>

Equals(MatchNode?)

public bool Equals(LocalPattern.MatchNode? other)

Parameters

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

Parameters

left LocalPattern.MatchNode
right LocalPattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left LocalPattern.MatchNode
right LocalPattern.MatchNode

Returns

bool