Table of Contents

Class TypeSpecificationPattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a TypeSpecificationPattern.

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

Constructors

MatchNode(Pattern<ITypeDefOrRef?>, ITypeDefOrRef, IMatchNode<TypeSignature>)

Represents a match node produced by a TypeSpecificationPattern.

public MatchNode(Pattern<ITypeDefOrRef?> Pattern, ITypeDefOrRef ConcreteValue, IMatchNode<TypeSignature> Signature)

Parameters

Pattern Pattern<ITypeDefOrRef>
ConcreteValue ITypeDefOrRef
Signature IMatchNode<TypeSignature>

Properties

ConcreteValue

Gets the value that matched the pattern.

public ITypeDefOrRef ConcreteValue { get; init; }

Property Value

ITypeDefOrRef

Pattern

Gets the pattern that was matched.

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

Property Value

Pattern<ITypeDefOrRef>

Signature

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

Property Value

IMatchNode<TypeSignature>

Methods

Deconstruct(out Pattern<ITypeDefOrRef?>, out ITypeDefOrRef, out IMatchNode<TypeSignature>)

public void Deconstruct(out Pattern<ITypeDefOrRef?> Pattern, out ITypeDefOrRef ConcreteValue, out IMatchNode<TypeSignature> Signature)

Parameters

Pattern Pattern<ITypeDefOrRef>
ConcreteValue ITypeDefOrRef
Signature IMatchNode<TypeSignature>

Equals(MatchNode?)

public bool Equals(TypeSpecificationPattern.MatchNode? other)

Parameters

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

Parameters

left TypeSpecificationPattern.MatchNode
right TypeSpecificationPattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left TypeSpecificationPattern.MatchNode
right TypeSpecificationPattern.MatchNode

Returns

bool