Table of Contents

Class AssemblyScopePattern

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Defines the pattern that matches on assembly resolution scopes in a type.

[GenerateKeyedMatchNode]
public record AssemblyScopePattern : Pattern<IResolutionScope>, IEquatable<Pattern>, IEquatable<Pattern<IResolutionScope>>, IEquatable<AssemblyScopePattern>
Inheritance
AssemblyScopePattern
Implements
Inherited Members

Constructors

AssemblyScopePattern(AssemblyScopePattern)

protected AssemblyScopePattern(AssemblyScopePattern original)

Parameters

original AssemblyScopePattern

AssemblyScopePattern(Pattern<string?>)

Creates a new named assembly scope pattern.

public AssemblyScopePattern(Pattern<string?> name)

Parameters

name Pattern<string>

The expected name.

AssemblyScopePattern(Pattern<string?>, Pattern<Version>, Pattern<string?>)

Defines the pattern that matches on assembly resolution scopes in a type.

public AssemblyScopePattern(Pattern<string?> Name, Pattern<Version> Version, Pattern<string?> Culture)

Parameters

Name Pattern<string>

The pattern describing the name of the assembly.

Version Pattern<Version>

The pattern describing the version of the assembly.

Culture Pattern<string>

The pattern describing the culture of the assembly.

AssemblyScopePattern(string)

Creates a new named assembly scope pattern.

public AssemblyScopePattern(string name)

Parameters

name string

The expected name.

Properties

Culture

The pattern describing the culture of the assembly.

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

Property Value

Pattern<string>

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Name

The pattern describing the name of the assembly.

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

Property Value

Pattern<string>

Version

The pattern describing the version of the assembly.

public Pattern<Version> Version { get; init; }

Property Value

Pattern<Version>

Methods

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

public void Deconstruct(out Pattern<string?> Name, out Pattern<Version> Version, out Pattern<string?> Culture)

Parameters

Name Pattern<string>
Version Pattern<Version>
Culture Pattern<string>

Equals(AssemblyScopePattern?)

public virtual bool Equals(AssemblyScopePattern? other)

Parameters

other AssemblyScopePattern

Returns

bool

Equals(Pattern<IResolutionScope>?)

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

Parameters

other Pattern<IResolutionScope>

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

Attempts to match the provided input to the pattern.

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

Parameters

input IResolutionScope

The input to match.

context MatchingContext

The context in which to match the pattern to.

Returns

IMatchNode<IResolutionScope>

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

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

Parameters

left AssemblyScopePattern
right AssemblyScopePattern

Returns

bool

operator !=(AssemblyScopePattern?, AssemblyScopePattern?)

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

Parameters

left AssemblyScopePattern
right AssemblyScopePattern

Returns

bool