Class TypeLoadingProviderExtensions
Provides a set of extension methods for ITypeLoadingProvider.
Inheritance
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public static class TypeLoadingProviderExtensions : Object
Methods
GetType(ITypeLoadingProvider, String)
Gets the System.Type with the specified name, performing a case-sensitive search.
Declaration
public static Type GetType(this ITypeLoadingProvider provider, string typeName)
Parameters
Type | Name | Description |
---|---|---|
ITypeLoadingProvider | provider | The reflection provider. |
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. |
Returns
Type | Description |
---|---|
System.Type | The type with the specified name, if found; otherwise, null. |
GetType(ITypeLoadingProvider, String, Boolean)
Gets the System.Type with the specified name, performing a case-sensitive search and specifying whether to throw an exception if the type is not found.
Declaration
public static Type GetType(this ITypeLoadingProvider provider, string typeName, bool throwOnError)
Parameters
Type | Name | Description |
---|---|---|
ITypeLoadingProvider | provider | The reflection provider. |
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. |
Returns
Type | Description |
---|---|
System.Type | The type with the specified name. If the type is not found, the |
GetType(ITypeLoadingProvider, String, Func<AssemblyName, Assembly>, Func<Assembly, String, Boolean, Type>)
Gets the type with the specified name, optionally providing custom methods to resolve the assembly and the type.
Declaration
public static Type GetType(this ITypeLoadingProvider provider, string typeName, Func<AssemblyName, Assembly> assemblyResolver, Func<Assembly, string, bool, Type> typeResolver)
Parameters
Type | Name | Description |
---|---|---|
ITypeLoadingProvider | provider | The reflection provider. |
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 |
Returns
Type | Description |
---|---|
System.Type | The type with the specified name, or null if the type is not found. |
GetType(ITypeLoadingProvider, String, Func<AssemblyName, Assembly>, Func<Assembly, String, Boolean, Type>, Boolean)
Gets the type with the specified name, specifying whether to throw an exception if the type is not found, and optionally providing custom methods to resolve the assembly and the type.
Declaration
public static Type GetType(this ITypeLoadingProvider provider, string typeName, Func<AssemblyName, Assembly> assemblyResolver, Func<Assembly, string, bool, Type> typeResolver, bool throwOnError)
Parameters
Type | Name | Description |
---|---|---|
ITypeLoadingProvider | provider | The reflection provider. |
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. |
Returns
Type | Description |
---|---|
System.Type | The type with the specified name. If the type is not found, the |