Class TypeSpecificationPattern.MatchNode
Represents a match node produced by a TypeSpecificationPattern.
public sealed record TypeSpecificationPattern.MatchNode : IMatchNode<ITypeDefOrRef?>, IMatchNode, IEquatable<TypeSpecificationPattern.MatchNode>
- Inheritance
-
TypeSpecificationPattern.MatchNode
- Implements
- Inherited Members
Constructors
MatchNode(Pattern<ITypeDefOrRef?>, ITypeDefOrRef, IMatchNode<TypeSignature>)
Represents a match node produced by a TypeSpecificationPattern.
public MatchNode(Pattern<ITypeDefOrRef?> Pattern, ITypeDefOrRef ConcreteValue, IMatchNode<TypeSignature> Signature)
Parameters
PatternPattern<ITypeDefOrRef>ConcreteValueITypeDefOrRefSignatureIMatchNode<TypeSignature>
Properties
ConcreteValue
Gets the value that matched the pattern.
public ITypeDefOrRef ConcreteValue { get; init; }
Property Value
Pattern
Gets the pattern that was matched.
public Pattern<ITypeDefOrRef?> Pattern { get; init; }
Property Value
Signature
public IMatchNode<TypeSignature> Signature { get; init; }
Property Value
Methods
Deconstruct(out Pattern<ITypeDefOrRef?>, out ITypeDefOrRef, out IMatchNode<TypeSignature>)
public void Deconstruct(out Pattern<ITypeDefOrRef?> Pattern, out ITypeDefOrRef ConcreteValue, out IMatchNode<TypeSignature> Signature)
Parameters
PatternPattern<ITypeDefOrRef>ConcreteValueITypeDefOrRefSignatureIMatchNode<TypeSignature>
Equals(MatchNode?)
public bool Equals(TypeSpecificationPattern.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 ==(TypeSpecificationPattern.MatchNode? left, TypeSpecificationPattern.MatchNode? right)
Parameters
Returns
operator !=(MatchNode?, MatchNode?)
public static bool operator !=(TypeSpecificationPattern.MatchNode? left, TypeSpecificationPattern.MatchNode? right)