Table of Contents

Class FieldDescriptorPattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a FieldDescriptorPattern.

public sealed record FieldDescriptorPattern.MatchNode : IMatchNode<IFieldDescriptor>, IMatchNode, IEquatable<FieldDescriptorPattern.MatchNode>
Inheritance
FieldDescriptorPattern.MatchNode
Implements
Inherited Members

Constructors

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

Represents a match node produced by a FieldDescriptorPattern.

public MatchNode(Pattern<IFieldDescriptor> Pattern, IFieldDescriptor ConcreteValue, IMatchNode<TypeSignature> FieldType, IMatchNode<ITypeDefOrRef?> DeclaringType, IMatchNode<string?> Name)

Parameters

Pattern Pattern<IFieldDescriptor>
ConcreteValue IFieldDescriptor
FieldType IMatchNode<TypeSignature>
DeclaringType IMatchNode<ITypeDefOrRef>
Name IMatchNode<string>

Properties

ConcreteValue

Gets the value that matched the pattern.

public IFieldDescriptor ConcreteValue { get; init; }

Property Value

IFieldDescriptor

DeclaringType

public IMatchNode<ITypeDefOrRef?> DeclaringType { get; init; }

Property Value

IMatchNode<ITypeDefOrRef>

FieldType

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

Property Value

IMatchNode<TypeSignature>

Name

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

Property Value

IMatchNode<string>

Pattern

Gets the pattern that was matched.

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

Property Value

Pattern<IFieldDescriptor>

Methods

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

public void Deconstruct(out Pattern<IFieldDescriptor> Pattern, out IFieldDescriptor ConcreteValue, out IMatchNode<TypeSignature> FieldType, out IMatchNode<ITypeDefOrRef?> DeclaringType, out IMatchNode<string?> Name)

Parameters

Pattern Pattern<IFieldDescriptor>
ConcreteValue IFieldDescriptor
FieldType IMatchNode<TypeSignature>
DeclaringType IMatchNode<ITypeDefOrRef>
Name IMatchNode<string>

Equals(MatchNode?)

public bool Equals(FieldDescriptorPattern.MatchNode? other)

Parameters

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

Parameters

left FieldDescriptorPattern.MatchNode
right FieldDescriptorPattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left FieldDescriptorPattern.MatchNode
right FieldDescriptorPattern.MatchNode

Returns

bool