MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeType­Factory
Open sandboxFocus

TypeFactory Class

Exposes methods that return instances of the IType interface.

Inheritance
System.Object
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 System.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 System.Nullable<>, 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 System.Nullable<> of this type.