Table of Contents

Class MethodDefinitionPattern.MatchNode

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Represents a match node produced by a MethodDefinitionPattern.

public sealed record MethodDefinitionPattern.MatchNode : IMatchNode<MethodDefinition>, IMatchNode, IEquatable<MethodDefinitionPattern.MatchNode>
Inheritance
MethodDefinitionPattern.MatchNode
Implements
Inherited Members

Constructors

MatchNode(Pattern<MethodDefinition>, MethodDefinition, IMatchNode<MethodAttributes>, IMatchNode<TypeSignature>, IMatchNode<string?>, IMatchNode<IList<GenericParameter>>, IMatchNode<IReadOnlyList<Parameter>>, IMatchNode<MethodImplAttributes>, IMatchNode<CilMethodBody?>)

Represents a match node produced by a MethodDefinitionPattern.

public MatchNode(Pattern<MethodDefinition> Pattern, MethodDefinition ConcreteValue, IMatchNode<MethodAttributes> Attributes, IMatchNode<TypeSignature> ReturnType, IMatchNode<string?> Name, IMatchNode<IList<GenericParameter>> GenericParameters, IMatchNode<IReadOnlyList<Parameter>> Parameters, IMatchNode<MethodImplAttributes> ImplAttributes, IMatchNode<CilMethodBody?> Body)

Parameters

Pattern Pattern<MethodDefinition>
ConcreteValue MethodDefinition
Attributes IMatchNode<MethodAttributes>
ReturnType IMatchNode<TypeSignature>
Name IMatchNode<string>
GenericParameters IMatchNode<IList<GenericParameter>>
Parameters IMatchNode<IReadOnlyList<Parameter>>
ImplAttributes IMatchNode<MethodImplAttributes>
Body IMatchNode<CilMethodBody>

Properties

Attributes

public IMatchNode<MethodAttributes> Attributes { get; init; }

Property Value

IMatchNode<MethodAttributes>

Body

public IMatchNode<CilMethodBody?> Body { get; init; }

Property Value

IMatchNode<CilMethodBody>

ConcreteValue

Gets the value that matched the pattern.

public MethodDefinition ConcreteValue { get; init; }

Property Value

MethodDefinition

GenericParameters

public IMatchNode<IList<GenericParameter>> GenericParameters { get; init; }

Property Value

IMatchNode<IList<GenericParameter>>

ImplAttributes

public IMatchNode<MethodImplAttributes> ImplAttributes { get; init; }

Property Value

IMatchNode<MethodImplAttributes>

Name

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

Property Value

IMatchNode<string>

Parameters

public IMatchNode<IReadOnlyList<Parameter>> Parameters { get; init; }

Property Value

IMatchNode<IReadOnlyList<Parameter>>

Pattern

Gets the pattern that was matched.

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

Property Value

Pattern<MethodDefinition>

ReturnType

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

Property Value

IMatchNode<TypeSignature>

Methods

Deconstruct(out Pattern<MethodDefinition>, out MethodDefinition, out IMatchNode<MethodAttributes>, out IMatchNode<TypeSignature>, out IMatchNode<string?>, out IMatchNode<IList<GenericParameter>>, out IMatchNode<IReadOnlyList<Parameter>>, out IMatchNode<MethodImplAttributes>, out IMatchNode<CilMethodBody?>)

public void Deconstruct(out Pattern<MethodDefinition> Pattern, out MethodDefinition ConcreteValue, out IMatchNode<MethodAttributes> Attributes, out IMatchNode<TypeSignature> ReturnType, out IMatchNode<string?> Name, out IMatchNode<IList<GenericParameter>> GenericParameters, out IMatchNode<IReadOnlyList<Parameter>> Parameters, out IMatchNode<MethodImplAttributes> ImplAttributes, out IMatchNode<CilMethodBody?> Body)

Parameters

Pattern Pattern<MethodDefinition>
ConcreteValue MethodDefinition
Attributes IMatchNode<MethodAttributes>
ReturnType IMatchNode<TypeSignature>
Name IMatchNode<string>
GenericParameters IMatchNode<IList<GenericParameter>>
Parameters IMatchNode<IReadOnlyList<Parameter>>
ImplAttributes IMatchNode<MethodImplAttributes>
Body IMatchNode<CilMethodBody>

Equals(MatchNode?)

public bool Equals(MethodDefinitionPattern.MatchNode? other)

Parameters

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

Parameters

left MethodDefinitionPattern.MatchNode
right MethodDefinitionPattern.MatchNode

Returns

bool

operator !=(MatchNode?, MatchNode?)

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

Parameters

left MethodDefinitionPattern.MatchNode
right MethodDefinitionPattern.MatchNode

Returns

bool