Class NestedTypeIdentifierPattern
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
originalNestedTypeIdentifierPattern
NestedTypeIdentifierPattern(Pattern<ITypeDefOrRef>, Pattern<string?>)
Defines the pattern matching on nested type references.
public NestedTypeIdentifierPattern(Pattern<ITypeDefOrRef> DeclaringType, Pattern<string?> Name)
Parameters
DeclaringTypePattern<ITypeDefOrRef>The pattern describing the enclosing type defining the nested type.
NamePattern<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
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Name
The pattern describing the name of the nested type.
public Pattern<string?> Name { get; init; }
Property Value
Methods
Deconstruct(out Pattern<ITypeDefOrRef>, out Pattern<string?>)
public void Deconstruct(out Pattern<ITypeDefOrRef> DeclaringType, out Pattern<string?> Name)
Parameters
DeclaringTypePattern<ITypeDefOrRef>NamePattern<string>
Equals(NestedTypeIdentifierPattern?)
public virtual bool Equals(NestedTypeIdentifierPattern? other)
Parameters
Returns
Equals(Pattern<ITypeDefOrRef?>?)
public override sealed bool Equals(Pattern<ITypeDefOrRef?>? other)
Parameters
otherPattern<ITypeDefOrRef>
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(ITypeDefOrRef?, MatchingContext)
Attempts to match the provided input to the pattern.
public override IMatchNode<ITypeDefOrRef?>? Match(ITypeDefOrRef? input, MatchingContext context)
Parameters
inputITypeDefOrRefThe input to match.
contextMatchingContextThe 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
builderStringBuilder
Returns
Operators
operator ==(NestedTypeIdentifierPattern?, NestedTypeIdentifierPattern?)
public static bool operator ==(NestedTypeIdentifierPattern? left, NestedTypeIdentifierPattern? right)
Parameters
Returns
operator !=(NestedTypeIdentifierPattern?, NestedTypeIdentifierPattern?)
public static bool operator !=(NestedTypeIdentifierPattern? left, NestedTypeIdentifierPattern? right)