Table of Contents

Class GenericInstanceTypeSignaturePattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a GenericInstanceTypeSignaturePattern.

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

Constructors

MatchNode(Pattern<TypeSignature>, TypeSignature, IMatchNode<bool>, IMatchNode<ITypeDefOrRef>, IMatchNode<IList<TypeSignature>>)

Represents a match node produced by a GenericInstanceTypeSignaturePattern.

public MatchNode(Pattern<TypeSignature> Pattern, TypeSignature ConcreteValue, IMatchNode<bool> IsValueType, IMatchNode<ITypeDefOrRef> GenericType, IMatchNode<IList<TypeSignature>> TypeArguments)

Parameters

Pattern Pattern<TypeSignature>
ConcreteValue TypeSignature
IsValueType IMatchNode<bool>
GenericType IMatchNode<ITypeDefOrRef>
TypeArguments IMatchNode<IList<TypeSignature>>

Properties

ConcreteValue

Gets the value that matched the pattern.

public TypeSignature ConcreteValue { get; init; }

Property Value

TypeSignature

GenericType

public IMatchNode<ITypeDefOrRef> GenericType { get; init; }

Property Value

IMatchNode<ITypeDefOrRef>

IsValueType

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

Property Value

IMatchNode<bool>

Pattern

Gets the pattern that was matched.

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

Property Value

Pattern<TypeSignature>

TypeArguments

public IMatchNode<IList<TypeSignature>> TypeArguments { get; init; }

Property Value

IMatchNode<IList<TypeSignature>>

Methods

Deconstruct(out Pattern<TypeSignature>, out TypeSignature, out IMatchNode<bool>, out IMatchNode<ITypeDefOrRef>, out IMatchNode<IList<TypeSignature>>)

public void Deconstruct(out Pattern<TypeSignature> Pattern, out TypeSignature ConcreteValue, out IMatchNode<bool> IsValueType, out IMatchNode<ITypeDefOrRef> GenericType, out IMatchNode<IList<TypeSignature>> TypeArguments)

Parameters

Pattern Pattern<TypeSignature>
ConcreteValue TypeSignature
IsValueType IMatchNode<bool>
GenericType IMatchNode<ITypeDefOrRef>
TypeArguments IMatchNode<IList<TypeSignature>>

Equals(MatchNode?)

public bool Equals(GenericInstanceTypeSignaturePattern.MatchNode? other)

Parameters

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

Parameters

left GenericInstanceTypeSignaturePattern.MatchNode
right GenericInstanceTypeSignaturePattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left GenericInstanceTypeSignaturePattern.MatchNode
right GenericInstanceTypeSignaturePattern.MatchNode

Returns

bool