Class PointerTypePattern
Defines the pattern matching on pointer type signatures.
public record PointerTypePattern : Pattern<TypeSignature>, IEquatable<Pattern>, IEquatable<Pattern<TypeSignature>>, IEquatable<PointerTypePattern>
- Inheritance
-
PointerTypePattern
- Implements
- Inherited Members
Constructors
PointerTypePattern(Pattern<TypeSignature>)
Defines the pattern matching on pointer type signatures.
public PointerTypePattern(Pattern<TypeSignature> BaseType)
Parameters
BaseTypePattern<TypeSignature>The pattern describing the element type.
PointerTypePattern(PointerTypePattern)
protected PointerTypePattern(PointerTypePattern original)
Parameters
originalPointerTypePattern
Properties
BaseType
The pattern describing the element type.
public Pattern<TypeSignature> BaseType { get; init; }
Property Value
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Methods
Deconstruct(out Pattern<TypeSignature>)
public void Deconstruct(out Pattern<TypeSignature> BaseType)
Parameters
BaseTypePattern<TypeSignature>
Equals(Pattern<TypeSignature>?)
public override sealed bool Equals(Pattern<TypeSignature>? other)
Parameters
otherPattern<TypeSignature>
Returns
Equals(PointerTypePattern?)
public virtual bool Equals(PointerTypePattern? other)
Parameters
otherPointerTypePattern
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Format(IndentedTextWriter)
Serializes the pattern to a readable string.
public override void Format(IndentedTextWriter writer)
Parameters
writerIndentedTextWriterThe output stream.
GetHashCode()
public override int GetHashCode()
Returns
Match(TypeSignature, MatchingContext)
Attempts to match the provided input to the pattern.
public override IMatchNode<TypeSignature>? Match(TypeSignature input, MatchingContext context)
Parameters
inputTypeSignatureThe input to match.
contextMatchingContextThe context in which to match the pattern to.
Returns
- IMatchNode<TypeSignature>
When successful, returns the root node of the match tree, otherwise
null.
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
Operators
operator ==(PointerTypePattern?, PointerTypePattern?)
public static bool operator ==(PointerTypePattern? left, PointerTypePattern? right)
Parameters
leftPointerTypePatternrightPointerTypePattern
Returns
operator !=(PointerTypePattern?, PointerTypePattern?)
public static bool operator !=(PointerTypePattern? left, PointerTypePattern? right)
Parameters
leftPointerTypePatternrightPointerTypePattern