Table of Contents

Class GenericParameterSignaturePattern

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Defines the pattern matching on generic parameter signatures.

[GenerateKeyedMatchNode]
public record GenericParameterSignaturePattern : Pattern<TypeSignature>, IEquatable<Pattern>, IEquatable<Pattern<TypeSignature>>, IEquatable<GenericParameterSignaturePattern>
Inheritance
GenericParameterSignaturePattern
Implements
Inherited Members

Constructors

GenericParameterSignaturePattern(GenericParameterType, Pattern<int>)

Defines the pattern matching on generic parameter signatures.

public GenericParameterSignaturePattern(GenericParameterType Type, Pattern<int> Index)

Parameters

Type GenericParameterType

The type of the generic parameter.

Index Pattern<int>

The pattern describing the index of the parameter.

GenericParameterSignaturePattern(GenericParameterSignaturePattern)

protected GenericParameterSignaturePattern(GenericParameterSignaturePattern original)

Parameters

original GenericParameterSignaturePattern

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Index

The pattern describing the index of the parameter.

public Pattern<int> Index { get; init; }

Property Value

Pattern<int>

Type

The type of the generic parameter.

public GenericParameterType Type { get; init; }

Property Value

GenericParameterType

Methods

Deconstruct(out GenericParameterType, out Pattern<int>)

public void Deconstruct(out GenericParameterType Type, out Pattern<int> Index)

Parameters

Type GenericParameterType
Index Pattern<int>

Equals(GenericParameterSignaturePattern?)

public virtual bool Equals(GenericParameterSignaturePattern? other)

Parameters

other GenericParameterSignaturePattern

Returns

bool

Equals(Pattern<TypeSignature>?)

public override sealed bool Equals(Pattern<TypeSignature>? other)

Parameters

other Pattern<TypeSignature>

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Format(IndentedTextWriter)

Serializes the pattern to a readable string.

public override void Format(IndentedTextWriter writer)

Parameters

writer IndentedTextWriter

The output stream.

GetHashCode()

public override int GetHashCode()

Returns

int

Match(TypeSignature, MatchingContext)

Attempts to match the provided input to the pattern.

public override IMatchNode<TypeSignature>? Match(TypeSignature input, MatchingContext context)

Parameters

input TypeSignature

The input to match.

context MatchingContext

The 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

builder StringBuilder

Returns

bool

Operators

operator ==(GenericParameterSignaturePattern?, GenericParameterSignaturePattern?)

public static bool operator ==(GenericParameterSignaturePattern? left, GenericParameterSignaturePattern? right)

Parameters

left GenericParameterSignaturePattern
right GenericParameterSignaturePattern

Returns

bool

operator !=(GenericParameterSignaturePattern?, GenericParameterSignaturePattern?)

public static bool operator !=(GenericParameterSignaturePattern? left, GenericParameterSignaturePattern? right)

Parameters

left GenericParameterSignaturePattern
right GenericParameterSignaturePattern

Returns

bool