Table of Contents

Class NestedTypeIdentifierPattern

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Defines the pattern matching on nested type references.

[GenerateKeyedMatchNode]
public record NestedTypeIdentifierPattern : Pattern<ITypeDefOrRef?>, IEquatable<Pattern>, IEquatable<Pattern<ITypeDefOrRef?>>, IEquatable<NestedTypeIdentifierPattern>
Inheritance
NestedTypeIdentifierPattern
Implements
Inherited Members
Extension Methods

Constructors

NestedTypeIdentifierPattern(NestedTypeIdentifierPattern)

protected NestedTypeIdentifierPattern(NestedTypeIdentifierPattern original)

Parameters

original NestedTypeIdentifierPattern

NestedTypeIdentifierPattern(Pattern<ITypeDefOrRef>, Pattern<string?>)

Defines the pattern matching on nested type references.

public NestedTypeIdentifierPattern(Pattern<ITypeDefOrRef> DeclaringType, Pattern<string?> Name)

Parameters

DeclaringType Pattern<ITypeDefOrRef>

The pattern describing the enclosing type defining the nested type.

Name Pattern<string>

The pattern describing the name of the nested type.

Properties

DeclaringType

The pattern describing the enclosing type defining the nested type.

public Pattern<ITypeDefOrRef> DeclaringType { get; init; }

Property Value

Pattern<ITypeDefOrRef>

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Name

The pattern describing the name of the nested type.

public Pattern<string?> Name { get; init; }

Property Value

Pattern<string>

Methods

Deconstruct(out Pattern<ITypeDefOrRef>, out Pattern<string?>)

public void Deconstruct(out Pattern<ITypeDefOrRef> DeclaringType, out Pattern<string?> Name)

Parameters

DeclaringType Pattern<ITypeDefOrRef>
Name Pattern<string>

Equals(NestedTypeIdentifierPattern?)

public virtual bool Equals(NestedTypeIdentifierPattern? other)

Parameters

other NestedTypeIdentifierPattern

Returns

bool

Equals(Pattern<ITypeDefOrRef?>?)

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

Parameters

other Pattern<ITypeDefOrRef>

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(ITypeDefOrRef?, MatchingContext)

Attempts to match the provided input to the pattern.

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

Parameters

input ITypeDefOrRef

The input to match.

context MatchingContext

The context in which to match the pattern to.

Returns

IMatchNode<ITypeDefOrRef>

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

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

Parameters

left NestedTypeIdentifierPattern
right NestedTypeIdentifierPattern

Returns

bool

operator !=(NestedTypeIdentifierPattern?, NestedTypeIdentifierPattern?)

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

Parameters

left NestedTypeIdentifierPattern
right NestedTypeIdentifierPattern

Returns

bool