Metalama//API Documentation/Aspect API/Metalama.​Framework.​Code/Type­Factory
Open sandboxFocus

Class TypeFactory

Exposes methods that return instances of the IType interface.

Inheritance
TypeFactory
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class TypeFactory : Object

Methods

Name Description
GetType(SpecialType)

Gets a INamedType representing a given SpecialType.

GetType(String)

Get type based on its full name, as used in reflection.

GetType(Type)

Gets an IType given a reflection Type.

MakeArrayType(IType, Int32)

Creates an array type from the current type.

MakePointerType(IType)

Creates an array type from the current type.

ToNonNullableType<T>(T)

Returns the non-nullable type from the current type. If the current type is a non-nullable reference type, returns the current type. If the current type is a Nullable<T>, i.e. a nullable value type, returns the underlying type.

ToNullableType<T>(T)

Creates a nullable type from the current type. If the current type is already nullable, returns the current type. If the type is a value type, returns a Nullable<T> of this type.