CompilerServicesUtility
Provides service methods for compilation.
Static members
Static member | Description |
CSharpCreateGenericType(...)
Signature: (templateType:Type * modelTypeName:string * throwWhenNotGeneric:bool) -> string
|
Return the raw type name (including namespace) with the given modelTypeName as generic argument (if applicable). Returns the typename in a way it can be used in C# code. Returns: |
CSharpGetRawTypeName(type)
Signature: type:Type -> string
|
Return the raw type name (including namespace) without any generic arguments. Returns the typename in a way it can be used in C# code. Returns: |
GenerateClassName()
Signature: unit -> string
|
Generates a random class name. Returns: A new random class name. |
GetConstructors(type)
Signature: type:Type -> IEnumerable<ConstructorInfo>
|
Gets the public or protected constructors of the specified type. Returns: An enumerable of constructors. |
GetIteratorInterface(type)
Signature: type:Type -> Type
|
Gets the Iterator type for the given compiler generated iterator. Returns: Tries to return IEnumerable of T if possible. |
GetLoadedAssemblies()
Signature: unit -> IEnumerable<Assembly>
|
Gets an enumerable of all assemblies loaded in the current domain. Returns: An enumerable of loaded assemblies. |
IsAnonymousType(type)
Signature: type:Type -> bool
|
Determines if the specified type is an anonymous type. Returns: True if the type is an anonymous type, otherwise false. |
IsAnonymousTypeRecursive(t)
Signature: t:Type -> bool
|
Checks if the given type is a anonymous type or a generic type containing a reference type as generic type argument Returns: true when there exists a reference to an anonymous type. |
IsDynamicType(type)
Signature: type:Type -> bool
|
Determines if the specified type is a dynamic type. Returns: True if the type is an anonymous type, otherwise false. |
IsIteratorType(type)
Signature: type:Type -> bool
|
Determines if the specified type is a compiler generated iterator type. Returns: True if the type is an iterator type, otherwise false. |
ResolveCSharpTypeName(type)
Signature: type:Type -> string
|
Resolves the C# name of the given type. Returns: The full type name or dynamic if the type is an instance of an dynamic type. |
ResolveVBTypeName(type)
Signature: type:Type -> string
|
Resolves the VB.net name of the given type. Returns: The full type name or Object if the type is an instance of an dynamic type. |
VBCreateGenericType(...)
Signature: (templateType:Type * modelTypeName:string * throwWhenNotGeneric:bool) -> string
|
Return the raw type name (including namespace) with the given modelTypeName as generic argument (if applicable). Returns the typename in a way it can be used in VB.net code. Returns: |
VBGetRawTypeName(type)
Signature: type:Type -> string
|
Return the raw type name (including namespace) without any generic arguments. Returns the typename in a way it can be used in VB.net code. Returns: |