Class MethodDefinitionPattern.MatchNode
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
PatternPattern<MethodDefinition>ConcreteValueMethodDefinitionAttributesIMatchNode<MethodAttributes>ReturnTypeIMatchNode<TypeSignature>NameIMatchNode<string>GenericParametersIMatchNode<IList<GenericParameter>>ParametersIMatchNode<IReadOnlyList<Parameter>>ImplAttributesIMatchNode<MethodImplAttributes>BodyIMatchNode<CilMethodBody>
Properties
Attributes
public IMatchNode<MethodAttributes> Attributes { get; init; }
Property Value
Body
public IMatchNode<CilMethodBody?> Body { get; init; }
Property Value
ConcreteValue
Gets the value that matched the pattern.
public MethodDefinition ConcreteValue { get; init; }
Property Value
GenericParameters
public IMatchNode<IList<GenericParameter>> GenericParameters { get; init; }
Property Value
ImplAttributes
public IMatchNode<MethodImplAttributes> ImplAttributes { get; init; }
Property Value
Name
public IMatchNode<string?> Name { get; init; }
Property Value
Parameters
public IMatchNode<IReadOnlyList<Parameter>> Parameters { get; init; }
Property Value
Pattern
Gets the pattern that was matched.
public Pattern<MethodDefinition> Pattern { get; init; }
Property Value
ReturnType
public IMatchNode<TypeSignature> ReturnType { get; init; }
Property Value
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
PatternPattern<MethodDefinition>ConcreteValueMethodDefinitionAttributesIMatchNode<MethodAttributes>ReturnTypeIMatchNode<TypeSignature>NameIMatchNode<string>GenericParametersIMatchNode<IList<GenericParameter>>ParametersIMatchNode<IReadOnlyList<Parameter>>ImplAttributesIMatchNode<MethodImplAttributes>BodyIMatchNode<CilMethodBody>
Equals(MatchNode?)
public bool Equals(MethodDefinitionPattern.MatchNode? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetChildren()
Enumerates all child nodes of this match node.
public IEnumerable<(string Name, IMatchNode Match)> GetChildren()
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(MatchNode?, MatchNode?)
public static bool operator ==(MethodDefinitionPattern.MatchNode? left, MethodDefinitionPattern.MatchNode? right)
Parameters
Returns
operator !=(MatchNode?, MatchNode?)
public static bool operator !=(MethodDefinitionPattern.MatchNode? left, MethodDefinitionPattern.MatchNode? right)