Table of Contents

Class PatternExtensions

Namespace
CilFi.Patterns
Assembly
CilFi.Core.dll

Provides extensions to Pattern<T>.

public static class PatternExtensions
Inheritance
PatternExtensions
Inherited Members

Methods

MakeGenericInstanceType(Pattern<ITypeDefOrRef>, bool, Pattern<IList<TypeSignature>>)

Wraps the provided type pattern into a generic instance type pattern.

public static GenericInstanceTypeSignaturePattern MakeGenericInstanceType(this Pattern<ITypeDefOrRef> pattern, bool isValueType, Pattern<IList<TypeSignature>> typeArguments)

Parameters

pattern Pattern<ITypeDefOrRef>

The type pattern to wrap.

isValueType bool

true if the type is expected to be a value type.

typeArguments Pattern<IList<TypeSignature>>

The pattern describing the expected generic type arguments.

Returns

GenericInstanceTypeSignaturePattern

The pattern.

ToTypeSignature(Pattern<ITypeDefOrRef>, bool)

Wraps the provided type pattern into a type signature pattern.

public static TypeDefOrRefPattern ToTypeSignature(this Pattern<ITypeDefOrRef> pattern, bool isValueType)

Parameters

pattern Pattern<ITypeDefOrRef>

The type pattern to wrap.

isValueType bool

true if the type is expected to be a value type.

Returns

TypeDefOrRefPattern

The pattern.