Class CorLibScopePattern
Defines the pattern matching on CorLib assembly resolution scopes (e.g., mscorlib, netstandard or System.Runtime).
public record CorLibScopePattern : Pattern<IResolutionScope>, IEquatable<Pattern>, IEquatable<Pattern<IResolutionScope>>, IEquatable<CorLibScopePattern>
- Inheritance
-
CorLibScopePattern
- Implements
- Inherited Members
Constructors
CorLibScopePattern()
public CorLibScopePattern()
CorLibScopePattern(CorLibScopePattern)
protected CorLibScopePattern(CorLibScopePattern original)
Parameters
originalCorLibScopePattern
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Instance
Gets the singleton instance of the CorLibScopePattern.
public static CorLibScopePattern Instance { get; }
Property Value
Methods
Equals(CorLibScopePattern?)
public virtual bool Equals(CorLibScopePattern? other)
Parameters
otherCorLibScopePattern
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 ==(CorLibScopePattern?, CorLibScopePattern?)
public static bool operator ==(CorLibScopePattern? left, CorLibScopePattern? right)
Parameters
leftCorLibScopePatternrightCorLibScopePattern
Returns
operator !=(CorLibScopePattern?, CorLibScopePattern?)
public static bool operator !=(CorLibScopePattern? left, CorLibScopePattern? right)
Parameters
leftCorLibScopePatternrightCorLibScopePattern