Table of Contents

Class ArrayTypePattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a ArrayTypePattern.

public sealed record ArrayTypePattern.MatchNode : IMatchNode<TypeSignature>, IMatchNode, IEquatable<ArrayTypePattern.MatchNode>
Inheritance
ArrayTypePattern.MatchNode
Implements
Inherited Members

Constructors

MatchNode(Pattern<TypeSignature>, TypeSignature, IMatchNode<TypeSignature>, IMatchNode<IList<ArrayDimension>>)

Represents a match node produced by a ArrayTypePattern.

public MatchNode(Pattern<TypeSignature> Pattern, TypeSignature ConcreteValue, IMatchNode<TypeSignature> BaseType, IMatchNode<IList<ArrayDimension>> Dimensions)

Parameters

Pattern Pattern<TypeSignature>
ConcreteValue TypeSignature
BaseType IMatchNode<TypeSignature>
Dimensions IMatchNode<IList<ArrayDimension>>

Properties

BaseType

public IMatchNode<TypeSignature> BaseType { get; init; }

Property Value

IMatchNode<TypeSignature>

ConcreteValue

Gets the value that matched the pattern.

public TypeSignature ConcreteValue { get; init; }

Property Value

TypeSignature

Dimensions

public IMatchNode<IList<ArrayDimension>> Dimensions { get; init; }

Property Value

IMatchNode<IList<ArrayDimension>>

Pattern

Gets the pattern that was matched.

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

Property Value

Pattern<TypeSignature>

Methods

Deconstruct(out Pattern<TypeSignature>, out TypeSignature, out IMatchNode<TypeSignature>, out IMatchNode<IList<ArrayDimension>>)

public void Deconstruct(out Pattern<TypeSignature> Pattern, out TypeSignature ConcreteValue, out IMatchNode<TypeSignature> BaseType, out IMatchNode<IList<ArrayDimension>> Dimensions)

Parameters

Pattern Pattern<TypeSignature>
ConcreteValue TypeSignature
BaseType IMatchNode<TypeSignature>
Dimensions IMatchNode<IList<ArrayDimension>>

Equals(MatchNode?)

public bool Equals(ArrayTypePattern.MatchNode? other)

Parameters

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

Parameters

left ArrayTypePattern.MatchNode
right ArrayTypePattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left ArrayTypePattern.MatchNode
right ArrayTypePattern.MatchNode

Returns

bool