Class GenericInstanceTypeSignaturePattern
Defines the pattern matching on generic instance type signatures.
[GenerateKeyedMatchNode]
public record GenericInstanceTypeSignaturePattern : Pattern<TypeSignature>, IEquatable<Pattern>, IEquatable<Pattern<TypeSignature>>, IEquatable<GenericInstanceTypeSignaturePattern>
- Inheritance
-
GenericInstanceTypeSignaturePattern
- Implements
- Inherited Members
Constructors
GenericInstanceTypeSignaturePattern(GenericInstanceTypeSignaturePattern)
protected GenericInstanceTypeSignaturePattern(GenericInstanceTypeSignaturePattern original)
Parameters
originalGenericInstanceTypeSignaturePattern
GenericInstanceTypeSignaturePattern(Pattern<bool>, Pattern<ITypeDefOrRef>, Pattern<IList<TypeSignature>>)
Defines the pattern matching on generic instance type signatures.
public GenericInstanceTypeSignaturePattern(Pattern<bool> IsValueType, Pattern<ITypeDefOrRef> GenericType, Pattern<IList<TypeSignature>> TypeArguments)
Parameters
IsValueTypePattern<bool>The pattern describing whether the type is expected to be a value type or not.
GenericTypePattern<ITypeDefOrRef>The pattern describing the underlying type reference.
TypeArgumentsPattern<IList<TypeSignature>>The pattern describing the generic type arguments.
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
GenericType
The pattern describing the underlying type reference.
public Pattern<ITypeDefOrRef> GenericType { get; init; }
Property Value
IsValueType
The pattern describing whether the type is expected to be a value type or not.
public Pattern<bool> IsValueType { get; init; }
Property Value
TypeArguments
The pattern describing the generic type arguments.
public Pattern<IList<TypeSignature>> TypeArguments { get; init; }
Property Value
Methods
Deconstruct(out Pattern<bool>, out Pattern<ITypeDefOrRef>, out Pattern<IList<TypeSignature>>)
public void Deconstruct(out Pattern<bool> IsValueType, out Pattern<ITypeDefOrRef> GenericType, out Pattern<IList<TypeSignature>> TypeArguments)
Parameters
IsValueTypePattern<bool>GenericTypePattern<ITypeDefOrRef>TypeArgumentsPattern<IList<TypeSignature>>
Equals(GenericInstanceTypeSignaturePattern?)
public virtual bool Equals(GenericInstanceTypeSignaturePattern? other)
Parameters
Returns
Equals(Pattern<TypeSignature>?)
public override sealed bool Equals(Pattern<TypeSignature>? other)
Parameters
otherPattern<TypeSignature>
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 ==(GenericInstanceTypeSignaturePattern?, GenericInstanceTypeSignaturePattern?)
public static bool operator ==(GenericInstanceTypeSignaturePattern? left, GenericInstanceTypeSignaturePattern? right)
Parameters
Returns
operator !=(GenericInstanceTypeSignaturePattern?, GenericInstanceTypeSignaturePattern?)
public static bool operator !=(GenericInstanceTypeSignaturePattern? left, GenericInstanceTypeSignaturePattern? right)