Table of Contents

Class GetClassTypeReference

Namespace
ICSharpCode.Decompiler.TypeSystem.Implementation
Assembly
ICSharpCode.Decompiler.dll

Type Reference used when the fully qualified type name is known.

public sealed class GetClassTypeReference : ITypeReference, ISupportsInterning
Inheritance
GetClassTypeReference
Implements
Inherited Members

Constructors

GetClassTypeReference(FullTypeName, IModuleReference, bool?)

Creates a new GetClassTypeReference that searches a type definition.

public GetClassTypeReference(FullTypeName fullTypeName, IModuleReference module = null, bool? isReferenceType = null)

Parameters

fullTypeName FullTypeName

The full name of the type.

module IModuleReference

A reference to the module containing this type. If this parameter is null, the GetClassTypeReference will search in all assemblies belonging to the compilation.

isReferenceType bool?

GetClassTypeReference(IModuleReference, string, string, int, bool?)

Creates a new GetClassTypeReference that searches a top-level type in the specified assembly.

public GetClassTypeReference(IModuleReference module, string namespaceName, string name, int typeParameterCount = 0, bool? isReferenceType = null)

Parameters

module IModuleReference

A reference to the assembly containing this type. If this parameter is null, the GetClassTypeReference will search in all assemblies belonging to the ICompilation.

namespaceName string

The namespace name containing the type, e.g. "System.Collections.Generic".

name string

The name of the type, e.g. "List".

typeParameterCount int

The number of type parameters, (e.g. 1 for List<T>).

isReferenceType bool?

GetClassTypeReference(string, string, int, bool?)

Creates a new GetClassTypeReference that searches a top-level type in all assemblies.

public GetClassTypeReference(string namespaceName, string name, int typeParameterCount = 0, bool? isReferenceType = null)

Parameters

namespaceName string

The namespace name containing the type, e.g. "System.Collections.Generic".

name string

The name of the type, e.g. "List".

typeParameterCount int

The number of type parameters, (e.g. 1 for List<T>).

isReferenceType bool?

Properties

FullTypeName

Gets the full name of the type this reference is searching for.

public FullTypeName FullTypeName { get; }

Property Value

FullTypeName

Module

Gets the assembly reference. This property returns null if the GetClassTypeReference is searching in all assemblies of the compilation.

public IModuleReference Module { get; }

Property Value

IModuleReference

Methods

Resolve(ITypeResolveContext)

public IType Resolve(ITypeResolveContext context)

Parameters

context ITypeResolveContext

Returns

IType

ToString()

public override string ToString()

Returns

string