Table of Contents

Class ByReferenceTypePattern

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Defines the pattern that matches on by-reference type signature.

public record ByReferenceTypePattern : Pattern<TypeSignature>, IEquatable<Pattern>, IEquatable<Pattern<TypeSignature>>, IEquatable<ByReferenceTypePattern>
Inheritance
ByReferenceTypePattern
Implements
Inherited Members

Constructors

ByReferenceTypePattern(ByReferenceTypePattern)

protected ByReferenceTypePattern(ByReferenceTypePattern original)

Parameters

original ByReferenceTypePattern

ByReferenceTypePattern(Pattern<TypeSignature>)

Defines the pattern that matches on by-reference type signature.

public ByReferenceTypePattern(Pattern<TypeSignature> BaseType)

Parameters

BaseType Pattern<TypeSignature>

The pattern describing the type that is taken by reference.

Properties

BaseType

The pattern describing the type that is taken by reference.

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(ByReferenceTypePattern?)

public virtual bool Equals(ByReferenceTypePattern? other)

Parameters

other ByReferenceTypePattern

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

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

Parameters

left ByReferenceTypePattern
right ByReferenceTypePattern

Returns

bool

operator !=(ByReferenceTypePattern?, ByReferenceTypePattern?)

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

Parameters

left ByReferenceTypePattern
right ByReferenceTypePattern

Returns

bool