Class ModuleTypePattern
Defines the pattern matching on module or global types in a .NET module.
public record ModuleTypePattern : Pattern<ITypeDefOrRef?>, IEquatable<Pattern>, IEquatable<Pattern<ITypeDefOrRef?>>, IEquatable<ModuleTypePattern>
- Inheritance
-
ModuleTypePattern
- Implements
- Inherited Members
- Extension Methods
Constructors
ModuleTypePattern()
public ModuleTypePattern()
ModuleTypePattern(ModuleTypePattern)
protected ModuleTypePattern(ModuleTypePattern original)
Parameters
originalModuleTypePattern
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Instance
Gets the singleton instance of the ModuleTypePattern class.
public static ModuleTypePattern Instance { get; }
Property Value
Methods
Equals(ModuleTypePattern?)
public virtual bool Equals(ModuleTypePattern? other)
Parameters
otherModuleTypePattern
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 ==(ModuleTypePattern?, ModuleTypePattern?)
public static bool operator ==(ModuleTypePattern? left, ModuleTypePattern? right)
Parameters
leftModuleTypePatternrightModuleTypePattern
Returns
operator !=(ModuleTypePattern?, ModuleTypePattern?)
public static bool operator !=(ModuleTypePattern? left, ModuleTypePattern? right)
Parameters
leftModuleTypePatternrightModuleTypePattern