Class AssemblyScopePattern
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
originalAssemblyScopePattern
AssemblyScopePattern(Pattern<string?>)
Creates a new named assembly scope pattern.
public AssemblyScopePattern(Pattern<string?> name)
Parameters
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
NamePattern<string>The pattern describing the name of the assembly.
VersionPattern<Version>The pattern describing the version of the assembly.
CulturePattern<string>The pattern describing the culture of the assembly.
AssemblyScopePattern(string)
Creates a new named assembly scope pattern.
public AssemblyScopePattern(string name)
Parameters
namestringThe expected name.
Properties
Culture
The pattern describing the culture of the assembly.
public Pattern<string?> Culture { get; init; }
Property Value
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Name
The pattern describing the name of the assembly.
public Pattern<string?> Name { get; init; }
Property Value
Version
The pattern describing the version of the assembly.
public Pattern<Version> Version { get; init; }
Property Value
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
Equals(AssemblyScopePattern?)
public virtual bool Equals(AssemblyScopePattern? other)
Parameters
otherAssemblyScopePattern
Returns
Equals(Pattern<IResolutionScope>?)
public override sealed bool Equals(Pattern<IResolutionScope>? other)
Parameters
otherPattern<IResolutionScope>
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Format(IndentedTextWriter)
Serializes the pattern to a readable string.
public override void Format(IndentedTextWriter writer)
Parameters
writerIndentedTextWriterThe output stream.
GetHashCode()
public override int GetHashCode()
Returns
Match(IResolutionScope, MatchingContext)
Attempts to match the provided input to the pattern.
public override IMatchNode<IResolutionScope>? Match(IResolutionScope input, MatchingContext context)
Parameters
inputIResolutionScopeThe input to match.
contextMatchingContextThe 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
builderStringBuilder
Returns
Operators
operator ==(AssemblyScopePattern?, AssemblyScopePattern?)
public static bool operator ==(AssemblyScopePattern? left, AssemblyScopePattern? right)
Parameters
leftAssemblyScopePatternrightAssemblyScopePattern
Returns
operator !=(AssemblyScopePattern?, AssemblyScopePattern?)
public static bool operator !=(AssemblyScopePattern? left, AssemblyScopePattern? right)
Parameters
leftAssemblyScopePatternrightAssemblyScopePattern