Class BlocksBodyPattern.MatchNode
Represents the match node corresponding to a BlocksBodyPattern
public sealed record BlocksBodyPattern.MatchNode : IMatchNode<CilMethodBody?>, IMatchNode, IEquatable<BlocksBodyPattern.MatchNode>
- Inheritance
-
BlocksBodyPattern.MatchNode
- Implements
- Inherited Members
Constructors
MatchNode(Pattern<CilMethodBody?>, CilMethodBody?, IReadOnlyDictionary<string, IMatchNode<IList<CilInstruction>>>)
Represents the match node corresponding to a BlocksBodyPattern
public MatchNode(Pattern<CilMethodBody?> Pattern, CilMethodBody? ConcreteValue, IReadOnlyDictionary<string, IMatchNode<IList<CilInstruction>>> Blocks)
Parameters
PatternPattern<CilMethodBody>ConcreteValueCilMethodBodyBlocksIReadOnlyDictionary<string, IMatchNode<IList<CilInstruction>>>
Properties
Blocks
public IReadOnlyDictionary<string, IMatchNode<IList<CilInstruction>>> Blocks { get; init; }
Property Value
ConcreteValue
Gets the value that matched the pattern.
public CilMethodBody? ConcreteValue { 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 IReadOnlyDictionary<string, IMatchNode<IList<CilInstruction>>>)
public void Deconstruct(out Pattern<CilMethodBody?> Pattern, out CilMethodBody? ConcreteValue, out IReadOnlyDictionary<string, IMatchNode<IList<CilInstruction>>> Blocks)
Parameters
PatternPattern<CilMethodBody>ConcreteValueCilMethodBodyBlocksIReadOnlyDictionary<string, IMatchNode<IList<CilInstruction>>>
Equals(MatchNode?)
public bool Equals(BlocksBodyPattern.MatchNode? other)
Parameters
otherBlocksBodyPattern.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 ==(BlocksBodyPattern.MatchNode? left, BlocksBodyPattern.MatchNode? right)
Parameters
leftBlocksBodyPattern.MatchNoderightBlocksBodyPattern.MatchNode
Returns
operator !=(MatchNode?, MatchNode?)
public static bool operator !=(BlocksBodyPattern.MatchNode? left, BlocksBodyPattern.MatchNode? right)
Parameters
leftBlocksBodyPattern.MatchNoderightBlocksBodyPattern.MatchNode