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