Table of Contents

Class TypeIdentifierPattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a TypeIdentifierPattern.

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

Constructors

MatchNode(Pattern<ITypeDefOrRef?>, ITypeDefOrRef, IMatchNode<IResolutionScope?>, IMatchNode<string?>, IMatchNode<string?>)

Represents a match node produced by a TypeIdentifierPattern.

public MatchNode(Pattern<ITypeDefOrRef?> Pattern, ITypeDefOrRef ConcreteValue, IMatchNode<IResolutionScope?> Scope, IMatchNode<string?> Namespace, IMatchNode<string?> Name)

Parameters

Pattern Pattern<ITypeDefOrRef>
ConcreteValue ITypeDefOrRef
Scope IMatchNode<IResolutionScope>
Namespace IMatchNode<string>
Name IMatchNode<string>

Properties

ConcreteValue

Gets the value that matched the pattern.

public ITypeDefOrRef ConcreteValue { get; init; }

Property Value

ITypeDefOrRef

Name

public IMatchNode<string?> Name { get; init; }

Property Value

IMatchNode<string>

Namespace

public IMatchNode<string?> Namespace { get; init; }

Property Value

IMatchNode<string>

Pattern

Gets the pattern that was matched.

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

Property Value

Pattern<ITypeDefOrRef>

Scope

public IMatchNode<IResolutionScope?> Scope { get; init; }

Property Value

IMatchNode<IResolutionScope>

Methods

Deconstruct(out Pattern<ITypeDefOrRef?>, out ITypeDefOrRef, out IMatchNode<IResolutionScope?>, out IMatchNode<string?>, out IMatchNode<string?>)

public void Deconstruct(out Pattern<ITypeDefOrRef?> Pattern, out ITypeDefOrRef ConcreteValue, out IMatchNode<IResolutionScope?> Scope, out IMatchNode<string?> Namespace, out IMatchNode<string?> Name)

Parameters

Pattern Pattern<ITypeDefOrRef>
ConcreteValue ITypeDefOrRef
Scope IMatchNode<IResolutionScope>
Namespace IMatchNode<string>
Name IMatchNode<string>

Equals(MatchNode?)

public bool Equals(TypeIdentifierPattern.MatchNode? other)

Parameters

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

Parameters

left TypeIdentifierPattern.MatchNode
right TypeIdentifierPattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left TypeIdentifierPattern.MatchNode
right TypeIdentifierPattern.MatchNode

Returns

bool