Class LocalsPattern.MatchNode
Represents a match node produced by a LocalsPattern.
public sealed record LocalsPattern.MatchNode : IMatchNode<CilMethodBody?>, IMatchNode, IEquatable<LocalsPattern.MatchNode>
- Inheritance
-
LocalsPattern.MatchNode
- Implements
- Inherited Members
Constructors
MatchNode(Pattern<CilMethodBody?>, CilMethodBody, IMatchNode<bool>, IMatchNode<IList<CilLocalVariable>>)
Represents a match node produced by a LocalsPattern.
public MatchNode(Pattern<CilMethodBody?> Pattern, CilMethodBody ConcreteValue, IMatchNode<bool> InitializeLocals, IMatchNode<IList<CilLocalVariable>> Locals)
Parameters
PatternPattern<CilMethodBody>ConcreteValueCilMethodBodyInitializeLocalsIMatchNode<bool>LocalsIMatchNode<IList<CilLocalVariable>>
Properties
ConcreteValue
Gets the value that matched the pattern.
public CilMethodBody ConcreteValue { get; init; }
Property Value
InitializeLocals
public IMatchNode<bool> InitializeLocals { get; init; }
Property Value
Locals
public IMatchNode<IList<CilLocalVariable>> Locals { 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<bool>, out IMatchNode<IList<CilLocalVariable>>)
public void Deconstruct(out Pattern<CilMethodBody?> Pattern, out CilMethodBody ConcreteValue, out IMatchNode<bool> InitializeLocals, out IMatchNode<IList<CilLocalVariable>> Locals)
Parameters
PatternPattern<CilMethodBody>ConcreteValueCilMethodBodyInitializeLocalsIMatchNode<bool>LocalsIMatchNode<IList<CilLocalVariable>>
Equals(MatchNode?)
public bool Equals(LocalsPattern.MatchNode? other)
Parameters
otherLocalsPattern.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 ==(LocalsPattern.MatchNode? left, LocalsPattern.MatchNode? right)
Parameters
leftLocalsPattern.MatchNoderightLocalsPattern.MatchNode
Returns
operator !=(MatchNode?, MatchNode?)
public static bool operator !=(LocalsPattern.MatchNode? left, LocalsPattern.MatchNode? right)
Parameters
leftLocalsPattern.MatchNoderightLocalsPattern.MatchNode