Table of Contents

Class PointerTypePattern

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

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

BaseType Pattern<TypeSignature>

The pattern describing the element type.

PointerTypePattern(PointerTypePattern)

protected PointerTypePattern(PointerTypePattern original)

Parameters

original PointerTypePattern

Properties

BaseType

The pattern describing the element type.

public Pattern<TypeSignature> BaseType { get; init; }

Property Value

Pattern<TypeSignature>

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Methods

Deconstruct(out Pattern<TypeSignature>)

public void Deconstruct(out Pattern<TypeSignature> BaseType)

Parameters

BaseType Pattern<TypeSignature>

Equals(Pattern<TypeSignature>?)

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

Parameters

other Pattern<TypeSignature>

Returns

bool

Equals(PointerTypePattern?)

public virtual bool Equals(PointerTypePattern? other)

Parameters

other PointerTypePattern

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 ==(PointerTypePattern?, PointerTypePattern?)

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

Parameters

left PointerTypePattern
right PointerTypePattern

Returns

bool

operator !=(PointerTypePattern?, PointerTypePattern?)

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

Parameters

left PointerTypePattern
right PointerTypePattern

Returns

bool