Interface ITypeLoadingProvider
Interface representing a reflection provider used to load System.Type objects.
Inherited Members
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public interface ITypeLoadingProvider : IComTypeLoadingProvider
Methods
GetType(String, Boolean, Boolean)
Gets the System.Type with the specified name, specifying whether to perform a case-sensitive search and whether to throw an exception if the type is not found.
Declaration
Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeName | The assembly-qualified name of the type to get. See System.Type.AssemblyQualifiedName. If the type is in the currently executing assembly or in Mscorlib.dll, it is sufficient to supply the type name qualified by its namespace. |
System.Boolean | throwOnError | true to throw an exception if the type cannot be found; false to return null.Specifying false also suppresses some other exception conditions, but not all of them. See the Exceptions section. |
System.Boolean | ignoreCase | true to perform a case-insensitive search for |
Returns
Type | Description |
---|---|
System.Type | The type with the specified name. If the type is not found, the |
GetType(String, Func<AssemblyName, Assembly>, Func<Assembly, String, Boolean, Type>, Boolean, Boolean)
Gets the type with the specified name, specifying whether to perform a case-sensitive search and whether to throw an exception if the type is not found, and optionally providing custom methods to resolve the assembly and the type.
Declaration
Type GetType(string typeName, Func<AssemblyName, Assembly> assemblyResolver, Func<Assembly, string, bool, Type> typeResolver, bool throwOnError, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeName | The name of the type to get. If the |
System.Func<System.Reflection.AssemblyName, System.Reflection.Assembly> | assemblyResolver | A method that locates and returns the assembly that is specified in |
System.Func<System.Reflection.Assembly, System.String, System.Boolean, System.Type> | typeResolver | A method that locates and returns the type that is specified by |
System.Boolean | throwOnError | true to throw an exception if the type cannot be found; false to return null. Specifying false also suppresses some other exception conditions, but not all of them. See the Exceptions section. |
System.Boolean | ignoreCase | true to perform a case-insensitive search for |
Returns
Type | Description |
---|---|
System.Type | The type with the specified name. If the type is not found, the |
ReflectionOnlyGetType(String, Boolean, Boolean)
Gets the System.Type with the specified name, specifying whether to perform a case-sensitive search and whether to throw an exception if the type is not found. The type is loaded for reflection only, not for execution.
Declaration
Type ReflectionOnlyGetType(string typeName, bool throwIfNotFound, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeName | The assembly-qualified name of the System.Type to get. |
System.Boolean | throwIfNotFound | true to throw a System.TypeLoadException if the type cannot be found; false to return null if the type cannot be found. Specifying false also suppresses some other exception conditions, but not all of them. See the Exceptions section. |
System.Boolean | ignoreCase | true to perform a case-insensitive search for |
Returns
Type | Description |
---|---|
System.Type | The type with the specified name, if found; otherwise, null. If the type is not found, the |