Class DefaultReflectionProvider
Default reflection provider implementation.
Inheritance
Implements
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public class DefaultReflectionProvider : ReflectionProvider, IReflectionProvider, IReflectionIntrospectionProvider, IAssemblyIntrospectionProvider, IModuleIntrospectionProvider, ITypeIntrospectionProvider, IReflectionTypeSystemProvider, IFieldInfoIntrospectionProvider, IMethodInfoIntrospectionProvider, IMethodBaseIntrospectionProvider, IPropertyInfoIntrospectionProvider, IEventInfoIntrospectionProvider, IMemberInfoIntrospectionProvider, IParameterInfoIntrospectionProvider, IReflectionCreationProvider, ITypeCreationProvider, IMethodCreationProvider, IReflectionInvocationProvider, IReflectionLoadingProvider, IAssemblyLoadingProvider, IModuleLoadingProvider, ITypeLoadingProvider, IComTypeLoadingProvider, IReflectionHandlerResolver
Constructors
DefaultReflectionProvider()
Creates a new instance of the default reflection provider.
Declaration
protected DefaultReflectionProvider()
Fields
Instance
Gets the singleton instance of the default reflection provider.
Declaration
public static readonly DefaultReflectionProvider Instance
Field Value
Type | Description |
---|---|
DefaultReflectionProvider |
Methods
AddEventHandler(EventInfo, Object, Delegate)
Adds an event handler to an event source.
Declaration
public override void AddEventHandler(EventInfo event, object target, Delegate handler)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to add a handler to. |
System.Object | target | The event source. |
System.Delegate | handler | Encapsulates a method or methods to be invoked when the event is raised by the target. |
Overrides
AddModuleResolve(Assembly, ModuleResolveEventHandler)
Adds a module resolve handler.
Declaration
public override void AddModuleResolve(Assembly assembly, ModuleResolveEventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to add a module resolve handler for. |
System.Reflection.ModuleResolveEventHandler | handler | The module resolve handler to add. |
Overrides
Remarks
Occurs when the common language runtime class loader cannot resolve a reference to an internal module of an assembly through normal means.
CanRead(PropertyInfo)
Gets a value indicating whether the property can be read.
Declaration
public override bool CanRead(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to check for readability. |
Returns
Type | Description |
---|---|
System.Boolean | true if this property can be read; otherwise, false. |
Overrides
CanWrite(PropertyInfo)
Gets a value indicating whether the property can be written.
Declaration
public override bool CanWrite(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to check for writeable. |
Returns
Type | Description |
---|---|
System.Boolean | true if this property can be written; otherwise, false. |
Overrides
ContainsGenericParameters(MethodBase)
Gets a value indicating whether the generic method contains unassigned generic type parameters.
Declaration
public override bool ContainsGenericParameters(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to check for generic parameters. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
ContainsGenericParameters(Type)
Gets a value indicating whether the specified type
object has type parameters that have not been replaced by specific types.
Declaration
public override bool ContainsGenericParameters(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check for generic parameters. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
CreateDelegate(MethodInfo, Type)
Creates a delegate that can be used to invoke the specified static method.
Declaration
public override Delegate CreateDelegate(MethodInfo method, Type delegateType)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to create a delegate for. |
System.Type | delegateType | The type of the delegate to create. |
Returns
Type | Description |
---|---|
System.Delegate | An instance of the specified delegate type that can be used to invoke the specified static method. |
Overrides
CreateDelegate(MethodInfo, Type, Object)
Creates a delegate that can be used to invoke the specified instance method on the specified target object.
Declaration
public override Delegate CreateDelegate(MethodInfo method, Type delegateType, object target)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to create a delegate for. |
System.Type | delegateType | The type of the delegate to create. |
System.Object | target | The target object to invoke the method on. |
Returns
Type | Description |
---|---|
System.Delegate | An instance of the specified delegate type that can be used to invoke the specified instance method on the specified target object. |
Overrides
CreateInstance(Assembly, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[])
Locates the specified type from specified assembly
and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes.
Declaration
public override object CreateInstance(Assembly assembly, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly containing the type to instantiate. |
System.String | typeName | The System.Type.FullName of the type to locate. |
System.Boolean | ignoreCase | true to ignore the case of the type name; otherwise, false. |
System.Reflection.BindingFlags | bindingAttr | A bitmask that affects the way in which the search is conducted. The value is a combination of bit flags from System.Reflection.BindingFlags. |
System.Reflection.Binder | binder | An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If |
System.Object[] | args | An array that contains the arguments to be passed to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to be invoked. If the default constructor is desired, |
System.Globalization.CultureInfo | culture | An instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.) |
System.Object[] | activationAttributes | An array of one or more attributes that can participate in activation. Typically, an array that contains a single |
Returns
Type | Description |
---|---|
System.Object | An instance of the specified type, or null if |
Overrides
FindInterfaces(Type, TypeFilter, Object)
Returns an array of System.Type objects representing a filtered list of interfaces implemented or inherited by the specified type
.
Declaration
public override IReadOnlyList<Type> FindInterfaces(Type type, TypeFilter filter, object filterCriteria)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to find interfaces for. |
System.Reflection.TypeFilter | filter | The delegate that compares the interfaces against |
System.Object | filterCriteria | The search criteria that determines whether an interface should be included in the returned array. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing a filtered list of the interfaces implemented or inherited by the specified |
Overrides
Remarks
Note to implementers: Please ensure that FindInterfaces(Type, TypeFilter, Object) and GetInterfaces(Type) have consistent behavior. When overriding this method, make sure that similar methods provide consistent results.
FindMembers(Type, MemberTypes, BindingFlags, MemberFilter, Object)
Returns a filtered array of System.Reflection.MemberInfo objects of the specified member type.
Declaration
public override IReadOnlyList<MemberInfo> FindMembers(Type type, MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to find members in. |
System.Reflection.MemberTypes | memberType | An object that indicates the type of member to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted.-or- Zero, to return null. |
System.Reflection.MemberFilter | filter | The delegate that does the comparisons, returning true if the member currently being inspected matches the |
System.Object | filterCriteria | The search criteria that determines whether a member is returned in the array of MemberInfo objects.The fields of FieldAttributes, MethodAttributes, and MethodImplAttributes can be used in conjunction with the FilterAttribute delegate supplied by this class. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | A filtered array of System.Reflection.MemberInfo objects of the specified member type.-or- An empty array of type System.Reflection.MemberInfo, if the specified |
Overrides
Remarks
Note to implementers: Please ensure that FindMembers(Type, MemberTypes, BindingFlags, MemberFilter, Object) and GetFields(Type, BindingFlags), GetMethods(Type, BindingFlags), GetProperties(Type, BindingFlags), GetEvents(Type, BindingFlags), and GetConstructors(Type, BindingFlags) have consistent behavior. When overriding this method, make sure that similar methods provide consistent results.
FindTypes(Module, TypeFilter, Object)
Returns an array of classes accepted by the given filter and filter criteria.
Declaration
public override IReadOnlyList<Type> FindTypes(Module module, TypeFilter filter, object filterCriteria)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to find types in. |
System.Reflection.TypeFilter | filter | The delegate used to filter the classes. |
System.Object | filterCriteria | An Object used to filter the classes. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of type System.Type containing classes that were accepted by the filter. |
Overrides
Remarks
Note to implementers: Please ensure that FindTypes(Module, TypeFilter, Object) and GetTypes(Module) have consistent behavior. When overriding this method, make sure that similar methods provide consistent results.
GetAccessors(PropertyInfo, Boolean)
Returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the specified property.
Declaration
public override IReadOnlyList<MethodInfo> GetAccessors(PropertyInfo property, bool nonPublic)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to get the accessors for. |
System.Boolean | nonPublic | true if non-public methods can be returned; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of System.Reflection.MethodInfo objects whose elements reflect the get, set, and other accessors of the specified property. If |
Overrides
GetAddMethod(EventInfo, Boolean)
Retrieves the System.Reflection.MethodInfo object for the System.Reflection.EventInfo.AddEventHandler(System.Object,System.Delegate) method of the event, specifying whether to return non-public methods.
Declaration
public override MethodInfo GetAddMethod(EventInfo event, bool nonPublic)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to get the add method for. |
System.Boolean | nonPublic | true if non-public methods can be returned; otherwise, false. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object representing the method used to add an event handler delegate from the event source. |
Overrides
GetArrayRank(Type)
Gets the number of dimensions in an System.Array.
Declaration
public override int GetArrayRank(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the rank for. |
Returns
Type | Description |
---|---|
System.Int32 | An System.Int32 containing the number of dimensions in the specified |
Overrides
GetAssembly(Module)
Gets the appropriate System.Reflection.Assembly for the specified module
.
Declaration
public override Assembly GetAssembly(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the assembly for. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | An System.Reflection.Assembly object. |
Overrides
GetAssembly(Type)
Gets the System.Reflection.Assembly in which the specified type
is declared. For generic types, gets the System.Reflection.Assembly in which the generic type is defined.
Declaration
public override Assembly GetAssembly(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the declaring assembly for. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | An System.Reflection.Assembly instance that describes the assembly containing the specified |
Overrides
GetAssemblyQualifiedName(Type)
Gets the assembly-qualified name of the specified type
, which includes the name of the assembly from which the specified type
was loaded.
Declaration
public override string GetAssemblyQualifiedName(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the assembly-qualified name for. |
Returns
Type | Description |
---|---|
System.String | The assembly-qualified name of the specified |
Overrides
GetAttributes(EventInfo)
Gets the attributes associated with the specified event.
Declaration
public override EventAttributes GetAttributes(EventInfo event)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to get the attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.EventAttributes | The attributes associated with the specified event. |
Overrides
GetAttributes(FieldInfo)
Gets the attributes associated with the specified field.
Declaration
public override FieldAttributes GetAttributes(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to get the attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.FieldAttributes | The attributes associated with the specified field. |
Overrides
GetAttributes(MethodBase)
Gets the attributes associated with the specified method.
Declaration
public override MethodAttributes GetAttributes(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The property to get the method for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodAttributes | The attributes associated with the specified method. |
Overrides
GetAttributes(ParameterInfo)
Gets the attributes for the specified parameter.
Declaration
public override ParameterAttributes GetAttributes(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.ParameterAttributes | A System.Reflection.ParameterAttributes object representing the attributes for this parameter. |
Overrides
GetAttributes(PropertyInfo)
Gets the attributes associated with the specified property.
Declaration
public override PropertyAttributes GetAttributes(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to get the attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.PropertyAttributes | The attributes associated with the specified property. |
Overrides
GetAttributes(Type)
Gets the attributes associated with the specified type
.
Declaration
public override TypeAttributes GetAttributes(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.TypeAttributes | A System.Reflection.TypeAttributes object representing the attribute set of the specified |
Overrides
GetBaseDefinition(MethodInfo)
Returns the System.Reflection.MethodInfo object for the method on the direct or indirect base class in which the method represented by this instance was first declared.
Declaration
public override MethodInfo GetBaseDefinition(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to get the base definition for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object for the first implementation of this method. |
Overrides
GetBaseType(Type)
Gets the type from which the specified type
directly inherits.
Declaration
public override Type GetBaseType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the base type for. |
Returns
Type | Description |
---|---|
System.Type | The System.Type from which the specified |
Overrides
GetCallingConvention(MethodBase)
Gets the calling convention of the specified method.
Declaration
public override CallingConventions GetCallingConvention(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to get the calling convention for. |
Returns
Type | Description |
---|---|
System.Reflection.CallingConventions | The calling convention of the specified method. |
Overrides
GetConstantValue(PropertyInfo)
Returns a literal value associated with the property by a compiler.
Declaration
public override object GetConstantValue(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property for which to get the literal value. |
Returns
Type | Description |
---|---|
System.Object | An object that contains the literal value associated with the property. If the literal value is a class type with an element value of zero, the return value is null. |
Overrides
GetConstructor(Type, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
Declaration
public override ConstructorInfo GetConstructor(Type type, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the constructor for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
System.Reflection.Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection.-or- A null reference, to use the System.Type.DefaultBinder. |
System.Reflection.CallingConventions | callConvention | The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and the stack is cleaned up. |
System.Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the constructor to get.-or- An empty array of the type System.Type to get a constructor that takes no parameters. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
Type | Description |
---|---|
System.Reflection.ConstructorInfo | An object representing the constructor that matches the specified requirements, if found; otherwise, null. |
Overrides
GetConstructors(Type, BindingFlags)
Searches for the constructors defined for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<ConstructorInfo> GetConstructors(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the constructors for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.ConstructorInfo> | An array of System.Reflection.ConstructorInfo objects representing all constructors defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.ConstructorInfo, if no constructors are defined for the specified type, or if none of the defined constructors match the binding constraints. |
Overrides
Remarks
Note to implementers: Please ensure that FindMembers(Type, MemberTypes, BindingFlags, MemberFilter, Object) and GetConstructors(Type, BindingFlags) have consistent behavior. When overriding this method, make sure that similar methods provide consistent results.
GetCustomAttributes(Assembly, Boolean)
Gets all the custom attributes for the specified assembly
.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(Assembly assembly, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get custom attributes for. |
System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Assembly. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified |
Overrides
GetCustomAttributes(Assembly, Type, Boolean)
Gets the custom attributes for the specified assembly
as specified by type.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(Assembly assembly, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get custom attributes for. |
System.Type | attributeType | The type for which the custom attributes are to be returned. |
System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Assembly. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified |
Overrides
GetCustomAttributes(MemberInfo, Boolean)
Returns an array of all custom attributes applied to the specified member.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(MemberInfo member, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to get the custom attributes for. |
System.Boolean | inherit | true to search the specified member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains all the custom attributes applied to the specified member, or an array with zero elements if no attributes are defined. |
Overrides
GetCustomAttributes(MemberInfo, Type, Boolean)
Returns an array of custom attributes applied to the specified member and identified by the specified attributeType
.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(MemberInfo member, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to get the custom attributes for. |
System.Type | attributeType | The type of attribute to search for. Only attributes that are assignable to this type are returned. |
System.Boolean | inherit | true to search the specified member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array of custom attributes applied to the specified member, or an array with zero elements if no attributes assignable to |
Overrides
GetCustomAttributes(Module, Boolean)
Gets all the custom attributes for the specified module
.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(Module module, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get custom attributes for. |
System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Module. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified |
Overrides
GetCustomAttributes(Module, Type, Boolean)
Gets the custom attributes for the specified module
as specified by type.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(Module module, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get custom attributes for. |
System.Type | attributeType | The type for which the custom attributes are to be returned. |
System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Module. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified |
Overrides
GetCustomAttributes(ParameterInfo, Boolean)
Returns an array of all custom attributes applied to the specified parameter.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(ParameterInfo parameter, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the custom attributes for. |
System.Boolean | inherit | true to search the specified parameter's inheritance chain to find the attributes; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains all the custom attributes applied to the specified parameter, or an array with zero elements if no attributes are defined. |
Overrides
GetCustomAttributes(ParameterInfo, Type, Boolean)
Returns an array of custom attributes applied to the specified parameter and identified by the specified attributeType
.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(ParameterInfo parameter, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the custom attributes for. |
System.Type | attributeType | The type of attribute to search for. Only attributes that are assignable to this type are returned. |
System.Boolean | inherit | true to search the specified parameter's inheritance chain to find the attributes; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array of custom attributes applied to the specified parameter, or an array with zero elements if no attributes assignable to |
Overrides
GetCustomAttributesData(Assembly)
Returns information about the attributes that have been applied to the specified assembly
, expressed as System.Reflection.CustomAttributeData objects.
Declaration
public override IEnumerable<CustomAttributeData> GetCustomAttributesData(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get custom attributes data for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | A generic list of System.Reflection.CustomAttributeData objects representing data about the attributes that have been applied to the specified |
Overrides
GetCustomAttributesData(MemberInfo)
Gets the custom attributes data defined on the specified member.
Declaration
public override IEnumerable<CustomAttributeData> GetCustomAttributesData(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to get the custom attributes data for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | The custom attributes data for the specified member. |
Overrides
GetCustomAttributesData(Module)
Returns information about the attributes that have been applied to the specified module
, expressed as System.Reflection.CustomAttributeData objects.
Declaration
public override IEnumerable<CustomAttributeData> GetCustomAttributesData(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get custom attributes data for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | A generic list of System.Reflection.CustomAttributeData objects representing data about the attributes that have been applied to the specified |
Overrides
GetCustomAttributesData(ParameterInfo)
Gets the custom attributes data defined on the specified parameter.
Declaration
public override IEnumerable<CustomAttributeData> GetCustomAttributesData(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The member to get the custom attributes data for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | The custom attributes data for the specified parameter. |
Overrides
GetDeclaringMethod(Type)
Gets a System.Reflection.MethodBase that represents the declaring method, if the specified type
represents a type parameter of a generic method.
Declaration
public override MethodBase GetDeclaringMethod(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the declaring method for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodBase | If the specified |
Overrides
GetDeclaringType(MemberInfo)
Gets the declaring type of the specified member.
Declaration
public override Type GetDeclaringType(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to get the declaring type for. |
Returns
Type | Description |
---|---|
System.Type | The declaring type of the specified member. |
Overrides
GetDeclaringType(Type)
Gets the type that declares the current nested type or generic type parameter.
Declaration
public override Type GetDeclaringType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the declaring type for. |
Returns
Type | Description |
---|---|
System.Type | A System.Type object representing the enclosing type, if the specified |
Overrides
GetDefaultMembers(Type)
Searches for the members defined for the specified type
whose System.Reflection.DefaultMemberAttribute is set.
Declaration
public override IReadOnlyList<MemberInfo> GetDefaultMembers(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the default members for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | An array of System.Reflection.MemberInfo objects representing all default members of the specified |
Overrides
GetDefaultValue(ParameterInfo)
Gets a value indicating the default value if the parameter has a default value.
Declaration
public override object GetDefaultValue(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the default value for. |
Returns
Type | Description |
---|---|
System.Object | The default value of the parameter, or System.DBNull.Value if the parameter has no default value. |
Overrides
GetDefinedTypes(Assembly)
Gets the types defined in the specified assembly
.
Declaration
public override IEnumerable<TypeInfo> GetDefinedTypes(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to search in. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.TypeInfo> | An array of types defined in the specified |
Overrides
GetElementType(Type)
Gets the element type of an array, by-ref, or pointer type.
Declaration
public override Type GetElementType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the element type for. |
Returns
Type | Description |
---|---|
System.Type | The element type of the specified type. |
Overrides
GetEntryPoint(Assembly)
Gets the entry point of this assembly.
Declaration
public override MethodInfo GetEntryPoint(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the entry point for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | An object that represents the entry point of this assembly. If no entry point is found (for example, the assembly is a DLL), null is returned. |
Overrides
GetEvent(Type, String, BindingFlags)
Searches for an event with the specified name, using the specified binding constraints.
Declaration
public override EventInfo GetEvent(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the event for. |
System.String | name | The name of the event to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Reflection.EventInfo | An object representing the event that matches the specified requirements, if found; otherwise, null. |
Overrides
GetEventHandlerType(EventInfo)
Gets the type of the event handler.
Declaration
public override Type GetEventHandlerType(EventInfo event)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to get the event handler type for. |
Returns
Type | Description |
---|---|
System.Type | The type of the event handler. |
Overrides
GetEvents(Type, BindingFlags)
Searches for events that are declared or inherited by the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<EventInfo> GetEvents(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the events for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.EventInfo> | An array of System.Reflection.EventInfo objects representing all events defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.EventInfo, if no events are defined for the specified type, or if none of the defined events match the binding constraints. |
Overrides
Remarks
Note to implementers: Please ensure that FindMembers(Type, MemberTypes, BindingFlags, MemberFilter, Object) and GetEvents(Type, BindingFlags) have consistent behavior. When overriding this method, make sure that similar methods provide consistent results.
GetExportedTypes(Assembly)
Gets the public types defined in the specified assembly
that are visible outside the specified assembly
.
Declaration
public override IReadOnlyList<Type> GetExportedTypes(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get exported types from. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array that represents the types defined in this assembly that are visible outside the assembly. |
Overrides
GetField(Module, String, BindingFlags)
Returns a field having the specified name and binding attributes.
Declaration
public override FieldInfo GetField(Module module, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
System.String | name | The field name. |
System.Reflection.BindingFlags | bindingAttr | One of the System.Reflection.BindingFlags bit flags used to control the search. |
Returns
Type | Description |
---|---|
System.Reflection.FieldInfo | A System.Reflection.FieldInfo object having the specified name and binding attributes, or null if the field does not exist. |
Overrides
GetField(Type, String, BindingFlags)
Searches for a field with the specified name, using the specified binding constraints.
Declaration
public override FieldInfo GetField(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the field for. |
System.String | name | The name of the field to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Reflection.FieldInfo | An object representing the field that matches the specified requirements, if found; otherwise, null. |
Overrides
GetFieldFromHandle(RuntimeFieldHandle)
Gets a System.Reflection.FieldInfo for the field represented by the specified handle.
Declaration
public override FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle)
Parameters
Type | Name | Description |
---|---|---|
System.RuntimeFieldHandle | handle | A System.RuntimeFieldHandle structure that contains the handle to the internal metadata representation of a field. |
Returns
Type | Description |
---|---|
System.Reflection.FieldInfo | A System.Reflection.FieldInfo object representing the field specified by |
Overrides
GetFieldFromHandle(RuntimeFieldHandle, RuntimeTypeHandle)
Gets a System.Reflection.FieldInfo for the field represented by the specified handle, for the specified generic type.
Declaration
public override FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle, RuntimeTypeHandle declaringType)
Parameters
Type | Name | Description |
---|---|---|
System.RuntimeFieldHandle | handle | A System.RuntimeFieldHandle structure that contains the handle to the internal metadata representation of a field. |
System.RuntimeTypeHandle | declaringType | A System.RuntimeTypeHandle structure that contains the handle to the generic type that defines the field. |
Returns
Type | Description |
---|---|
System.Reflection.FieldInfo | A System.Reflection.FieldInfo object representing the field specified by |
Overrides
GetFieldHandle(FieldInfo)
Gets a System.RuntimeFieldHandle, which is a handle to the internal metadata representation of a field.
Declaration
public override RuntimeFieldHandle GetFieldHandle(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to get the runtime handle for. |
Returns
Type | Description |
---|---|
System.RuntimeFieldHandle | A handle to the internal metadata representation of a field. |
Overrides
GetFields(Module, BindingFlags)
Returns the global fields defined on the module that match the specified binding flags.
Declaration
public override IReadOnlyList<FieldInfo> GetFields(Module module, BindingFlags bindingFlags)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
System.Reflection.BindingFlags | bindingFlags | A bitwise combination of System.Reflection.BindingFlags values that limit the search. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.FieldInfo> | An array of type System.Reflection.FieldInfo representing the global fields defined on the module that match the specified binding flags; if no global fields match the binding flags, an empty array is returned. |
Overrides
GetFields(Type, BindingFlags)
Searches for fields defined for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<FieldInfo> GetFields(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the fields for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.FieldInfo> | An array of System.Reflection.FieldInfo objects representing all fields defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.FieldInfo, if no fields are defined for the specified type, or if none of the defined fields match the binding constraints. |
Overrides
Remarks
Note to implementers: Please ensure that FindMembers(Type, MemberTypes, BindingFlags, MemberFilter, Object) and GetFields(Type, BindingFlags) have consistent behavior. When overriding this method, make sure that similar methods provide consistent results.
GetFieldType(FieldInfo)
Gets the type of the field.
Declaration
public override Type GetFieldType(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to get the type for. |
Returns
Type | Description |
---|---|
System.Type | The type of the field. |
Overrides
GetFile(Assembly, String)
Gets a System.IO.FileStream for the specified file in the file table of the manifest of the specified assembly
.
Declaration
public override FileStream GetFile(Assembly assembly, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the file from. |
System.String | name | The name of the specified file. Do not include the path to the file. |
Returns
Type | Description |
---|---|
System.IO.FileStream | A stream that contains the specified file, or null if the file is not found. |
Overrides
GetFiles(Assembly, Boolean)
Gets the files in the file table of an assembly manifest, specifying whether to include resource modules.
Declaration
public override IReadOnlyList<FileStream> GetFiles(Assembly assembly, bool getResourceModules)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the files from. |
System.Boolean | getResourceModules | true to include resource modules; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.IO.FileStream> | An array of streams that contain the files. |
Overrides
GetFullName(Assembly)
Gets the display name of the assembly.
Declaration
public override string GetFullName(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the display name for. |
Returns
Type | Description |
---|---|
System.String | The display name of the assembly. |
Overrides
GetFullName(Type)
Gets the fully qualified name of the specified type
, including the namespace of the System.Type but not the assembly.
Declaration
public override string GetFullName(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the full name for. |
Returns
Type | Description |
---|---|
System.String | The fully qualified name of the specified |
Overrides
GetFullyQualifiedName(Module)
Gets a string representing the fully qualified name and path to the specified module
.
Declaration
public override string GetFullyQualifiedName(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the fully qualified name for. |
Returns
Type | Description |
---|---|
System.String | The fully qualified module name. |
Overrides
GetGenericArguments(MethodInfo)
Returns an array of System.Type objects that represent the type arguments of a closed generic method or the type parameters of a generic method definition.
Declaration
public override IReadOnlyList<Type> GetGenericArguments(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to get the generic arguments for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that represent the type arguments of a generic method. Returns an empty array if the specified method is not a generic method. |
Overrides
GetGenericArguments(Type)
Returns an array of System.Type objects that represent the type arguments of a closed generic type or the type parameters of a generic type definition.
Declaration
public override IReadOnlyList<Type> GetGenericArguments(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic arguments for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that represent the type arguments of a generic type. Returns an empty array if the specified type is not a generic type. |
Overrides
GetGenericMethodDefinition(MethodInfo)
Gets the generic method definition of the specified generic method.
Declaration
public override MethodInfo GetGenericMethodDefinition(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to get the generic method definition for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | The generic method definition of the specified method. |
Overrides
GetGenericParameterAttributes(Type)
Gets a combination of System.Reflection.GenericParameterAttributes flags that describe the covariance and special constraints of the specified generic type parameter.
Declaration
public override GenericParameterAttributes GetGenericParameterAttributes(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic parameter attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.GenericParameterAttributes | A bitwise combination of System.Reflection.GenericParameterAttributes values that describes the covariance and special constraints of the specified generic type parameter. |
Overrides
GetGenericParameterConstraints(Type)
Returns an array of System.Type objects that represent the constraints on the generic type parameter.
Declaration
public override IReadOnlyList<Type> GetGenericParameterConstraints(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The generic parameter type to get the constraints for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that represent the constraints on the specified generic type parameter. |
Overrides
GetGenericParameterPosition(Type)
Gets the position of the type parameter in the type parameter list of the generic type or method that declared the parameter, when the specified type
represents a type parameter of a generic type or a generic method.
Declaration
public override int GetGenericParameterPosition(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic parameter position for. |
Returns
Type | Description |
---|---|
System.Int32 | The position of a type parameter in the type parameter list of the generic type or method that defines the parameter. Position numbers begin at 0. |
Overrides
GetGenericTypeDefinition(Type)
Gets the generic type definition of the specified generic type.
Declaration
public override Type GetGenericTypeDefinition(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic type definition for. |
Returns
Type | Description |
---|---|
System.Type | The generic type definition of the specified type. |
Overrides
GetGetMethod(PropertyInfo, Boolean)
Returns the public or non-public get accessor for this property.
Declaration
public override MethodInfo GetGetMethod(PropertyInfo property, bool nonPublic)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to get the get accessor for. |
System.Boolean | nonPublic | true if non-public methods can be returned; otherwise, false. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object representing the get accessor for this property, if |
Overrides
GetGuid(Type)
Gets the GUID associated with the specified type
.
Declaration
public override Guid GetGuid(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the associated GUID for. |
Returns
Type | Description |
---|---|
System.Guid | The GUID associated with the specified |
Overrides
GetHostContext(Assembly)
Gets the host context with which the assembly was loaded.
Declaration
public override long GetHostContext(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the host context for. |
Returns
Type | Description |
---|---|
System.Int64 | An System.Int64 value that indicates the host context with which the assembly was loaded, if any. |
Overrides
GetImageRuntimeVersion(Assembly)
Gets a string representing the version of the common language runtime (CLR) saved in the file containing the manifest.
Declaration
public override string GetImageRuntimeVersion(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the runtime version for. |
Returns
Type | Description |
---|---|
System.String | The CLR version folder name. This is not a full path. |
Overrides
GetIndexParameters(PropertyInfo)
Returns an array of all the index parameters for the property.
Declaration
public override IReadOnlyList<ParameterInfo> GetIndexParameters(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to get the index parameters for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.ParameterInfo> | An array of type System.Reflection.ParameterInfo containing the parameters for the indexes. If the property is not indexed, the array has 0 (zero) elements. |
Overrides
GetInterface(Type, String, Boolean)
Searches for the specified interface, specifying whether to do a case-insensitive search for the interface name.
Declaration
public override Type GetInterface(Type type, string name, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the interface for. |
System.String | name | The string containing the name of the interface to get. For generic interfaces, this is the mangled name. |
System.Boolean | ignoreCase | true to ignore the case of that part of |
Returns
Type | Description |
---|---|
System.Type | An object representing the interface with the specified name, implemented or inherited by the specified type, if found; otherwise, null. |
Overrides
GetInterfaceMap(Type, Type)
Returns an interface mapping for the specified interface type.
Declaration
public override InterfaceMapping GetInterfaceMap(Type type, Type interfaceType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the interface mapping for. |
System.Type | interfaceType | The interface type to retrieve a mapping for. |
Returns
Type | Description |
---|---|
System.Reflection.InterfaceMapping | An object that represents the interface mapping for |
Overrides
GetInterfaces(Type)
Gets all the interfaces implemented or inherited by the specified type.
Declaration
public override IReadOnlyList<Type> GetInterfaces(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the interfaces for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing all the interfaces implemented or inherited by the specified type.-or- An empty array of type System.Type, if no interfaces are implemented or inherited by the specified type. |
Overrides
GetLoadedModules(Assembly, Boolean)
Gets all the loaded modules that are part of the specified assembly
, specifying whether to include resource modules.
Declaration
public override IReadOnlyList<Module> GetLoadedModules(Assembly assembly, bool getResourceModules)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the loaded modules for. |
System.Boolean | getResourceModules | true to include resource modules; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.Module> | An array of modules. |
Overrides
GetLocation(Assembly)
Gets the path or UNC location of the loaded file that contains the manifest.
Declaration
public override string GetLocation(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the location for. |
Returns
Type | Description |
---|---|
System.String | The location of the loaded file that contains the manifest. If the loaded file was shadow-copied, the location is that of the file after being shadow-copied. If the assembly is loaded from a byte array, such as when using the System.Reflection.Assembly.Load(System.Byte[]) method overload, the value returned is an empty string (""). |
Overrides
GetManifestModule(Assembly)
Gets the module that contains the manifest for the current assembly.
Declaration
public override Module GetManifestModule(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the manifest module for. |
Returns
Type | Description |
---|---|
System.Reflection.Module | The module that contains the manifest for the assembly. |
Overrides
GetManifestResourceInfo(Assembly, String)
Returns information about how the given resource has been persisted.
Declaration
public override ManifestResourceInfo GetManifestResourceInfo(Assembly assembly, string resourceName)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the manifest resource info from. |
System.String | resourceName | The case-sensitive name of the resource. |
Returns
Type | Description |
---|---|
System.Reflection.ManifestResourceInfo | An object that is populated with information about the resource's topology, or null if the resource is not found. |
Overrides
GetManifestResourceNames(Assembly)
Returns the names of all the resources in the specified assembly
.
Declaration
public override IReadOnlyList<string> GetManifestResourceNames(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the manifest resource names from. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.String> | An array that contains the names of all the resources. |
Overrides
GetManifestResourceStream(Assembly, String)
Loads the specified manifest resource from the specified assembly
.
Declaration
public override Stream GetManifestResourceStream(Assembly assembly, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the manifest resource stream from. |
System.String | name | The case-sensitive name of the manifest resource being requested. |
Returns
Type | Description |
---|---|
System.IO.Stream | The manifest resource; or null if no resources were specified during compilation or if the resource is not visible to the caller. |
Overrides
GetManifestResourceStream(Assembly, Type, String)
Loads the specified manifest resource, scoped by the namespace of the specified type, from the specified assembly
.
Declaration
public override Stream GetManifestResourceStream(Assembly assembly, Type type, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the manifest resource stream from. |
System.Type | type | The type whose namespace is used to scope the manifest resource name. |
System.String | name | The case-sensitive name of the manifest resource being requested. |
Returns
Type | Description |
---|---|
System.IO.Stream | The manifest resource; or null if no resources were specified during compilation or if the resource is not visible to the caller. |
Overrides
GetMDStreamVersion(Module)
Gets the metadata stream version.
Declaration
public override int GetMDStreamVersion(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the stream version for. |
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit integer representing the metadata stream version. The high-order two bytes represent the major version number, and the low-order two bytes represent the minor version number. |
Overrides
GetMember(ParameterInfo)
Gets a value indicating the member in which the parameter is implemented.
Declaration
public override MemberInfo GetMember(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the member for. |
Returns
Type | Description |
---|---|
System.Reflection.MemberInfo | The member which implanted the parameter represented by |
Overrides
GetMember(Type, String, MemberTypes, BindingFlags)
Searches for the specified members of the specified member type, using the specified binding constraints.
Declaration
public override IReadOnlyList<MemberInfo> GetMember(Type type, string name, MemberTypes memberTypes, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the members for. |
System.String | name | The string containing the name of the members to get. |
System.Reflection.MemberTypes | memberTypes | The types of members to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | An array of System.Reflection.MemberInfo objects representing the members with the specified name, if found; otherwise, an empty array. |
Overrides
GetMembers(Type, BindingFlags)
Searches for members defined for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<MemberInfo> GetMembers(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the members for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | An array of System.Reflection.MemberInfo objects representing all members defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.MemberInfo, if no members are defined for the specified type, or if none of the defined members match the binding constraints. |
Overrides
GetMetadataToken(MemberInfo)
Gets a value that identifies a metadata element.
Declaration
public override int GetMetadataToken(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to get the metadata token for. |
Returns
Type | Description |
---|---|
System.Int32 | A value which, in combination with System.Reflection.MemberInfo.Module, uniquely identifies a metadata element. |
Overrides
GetMetadataToken(Module)
Gets a token that identifies the module in metadata.
Declaration
public override int GetMetadataToken(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the metadata token for. |
Returns
Type | Description |
---|---|
System.Int32 | An integer token that identifies the current module in metadata. |
Overrides
GetMetadataToken(ParameterInfo)
Gets a value that identifies this parameter in metadata.
Declaration
public override int GetMetadataToken(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the metadata token for. |
Returns
Type | Description |
---|---|
System.Int32 | A value which, in combination with the module, uniquely identifies this parameter in metadata. |
Overrides
GetMethod(Module, String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Returns the method implementation in accordance with the specified criteria.
Declaration
public override MethodInfo GetMethod(Module module, string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
System.String | name | The method name. |
System.Reflection.BindingFlags | bindingAttr | One of the BindingFlags bit flags used to control the search. |
System.Reflection.Binder | binder | An object that implements Binder, containing properties related to this method. |
System.Reflection.CallingConventions | callConvention | The calling convention for the method. |
System.Type[] | types | The parameter types to search for. |
System.Reflection.ParameterModifier[] | modifiers | An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object containing implementation information as specified, or null if the method does not exist. |
Overrides
GetMethod(Type, String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Searches for the specified method whose parameters match the specified generic parameter count, argument types and modifiers, using the specified binding constraints and the specified calling convention.
Declaration
public override MethodInfo GetMethod(Type type, string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the method for. |
System.String | name | The string containing the name of the method to get. |
System.Int32 | genericParameterCount | The number of generic type parameters of the method. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
System.Reflection.Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection.-or- A null reference, to use the System.Type.DefaultBinder. |
System.Reflection.CallingConventions | callConvention | The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and the stack is cleaned up. |
System.Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the method to get.-or- An empty array of the type System.Type to get a method that takes no parameters. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | An object representing the method that matches the specified requirements, if found; otherwise, null. |
Overrides
GetMethod(Type, String, BindingFlags)
Searches for the specified method, using the specified binding constraints.
Declaration
public override MethodInfo GetMethod(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the method for. |
System.String | name | The string containing the name of the method to get. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | An object representing the method that matches the specified requirements, if found; otherwise, null. |
Overrides
GetMethod(Type, String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
Declaration
public override MethodInfo GetMethod(Type type, string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the method for. |
System.String | name | The string containing the name of the method to get. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
System.Reflection.Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection.-or- A null reference, to use the System.Type.DefaultBinder. |
System.Reflection.CallingConventions | callConvention | The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and the stack is cleaned up. |
System.Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the method to get.-or- An empty array of the type System.Type to get a method that takes no parameters. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | An object representing the method that matches the specified requirements, if found; otherwise, null. |
Overrides
GetMethodBody(MethodBase)
Gets the method body of the specified method.
Declaration
public override MethodBody GetMethodBody(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to get the method body for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodBody | The method body of the specified method. |
Overrides
GetMethodFromHandle(RuntimeMethodHandle)
Gets method information by using the method's internal metadata representation (handle).
Declaration
public override MethodBase GetMethodFromHandle(RuntimeMethodHandle handle)
Parameters
Type | Name | Description |
---|---|---|
System.RuntimeMethodHandle | handle | The method's handle. |
Returns
Type | Description |
---|---|
System.Reflection.MethodBase | A System.Reflection.MethodBase containing information about the method. |
Overrides
GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)
Gets a System.Reflection.MethodBase object for the constructor or method represented by the specified handle, for the specified generic type.
Declaration
public override MethodBase GetMethodFromHandle(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType)
Parameters
Type | Name | Description |
---|---|---|
System.RuntimeMethodHandle | handle | A handle to the internal metadata representation of a constructor or method. |
System.RuntimeTypeHandle | declaringType | A handle to the generic type that defines the constructor or method. |
Returns
Type | Description |
---|---|
System.Reflection.MethodBase | A System.Reflection.MethodBase object representing the method or constructor specified by |
Overrides
GetMethodHandle(MethodBase)
Gets a handle to the internal metadata representation of the specified method.
Declaration
public override RuntimeMethodHandle GetMethodHandle(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to get a method handle for. |
Returns
Type | Description |
---|---|
System.RuntimeMethodHandle | A System.RuntimeMethodHandle object. |
Overrides
GetMethodImplementationFlags(MethodBase)
Returns the System.Reflection.MethodImplAttributes flags of the specified method.
Declaration
public override MethodImplAttributes GetMethodImplementationFlags(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to get the implementation flags for. |
Returns
Type | Description |
---|---|
System.Reflection.MethodImplAttributes | The System.Reflection.MethodImplAttributes flags. |
Overrides
GetMethods(Module, BindingFlags)
Returns the global methods defined on the module that match the specified binding flags.
Declaration
public override IReadOnlyList<MethodInfo> GetMethods(Module module, BindingFlags bindingFlags)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
System.Reflection.BindingFlags | bindingFlags | A bitwise combination of System.Reflection.BindingFlags values that limit the search. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of type System.Reflection.MethodInfo representing the global methods defined on the module that match the specified binding flags; if no global methods match the binding flags, an empty array is returned. |
Overrides
GetMethods(Type, BindingFlags)
Searches for methods defined for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<MethodInfo> GetMethods(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the methods for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of System.Reflection.MethodInfo objects representing all methods defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.MethodInfo, if no methods are defined for the specified type, or if none of the defined methods match the binding constraints. |
Overrides
Remarks
Note to implementers: Please ensure that FindMembers(Type, MemberTypes, BindingFlags, MemberFilter, Object) and GetMethods(Type, BindingFlags) have consistent behavior. When overriding this method, make sure that similar methods provide consistent results.
GetModule(Assembly, String)
Gets the specified module in the specified assembly
.
Declaration
public override Module GetModule(Assembly assembly, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the module from. |
System.String | name | The name of the module being requested. |
Returns
Type | Description |
---|---|
System.Reflection.Module | The module being requested, or null if the module is not found. |
Overrides
GetModule(MemberInfo)
Gets the module the member is defined in.
Declaration
public override Module GetModule(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to get the module for. |
Returns
Type | Description |
---|---|
System.Reflection.Module | The module defining the member. |
Overrides
GetModule(Type)
Gets the module in which the specified type
is defined.
Declaration
public override Module GetModule(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the module for. |
Returns
Type | Description |
---|---|
System.Reflection.Module | The module in which the specified |
Overrides
GetModuleHandle(Module)
Gets a handle for the module.
Declaration
public override ModuleHandle GetModuleHandle(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the module handle for. |
Returns
Type | Description |
---|---|
System.ModuleHandle | A System.ModuleHandle structure for the current module. |
Overrides
GetModules(Assembly, Boolean)
Gets all the modules that are part of the specified assembly
, specifying whether to include resource modules.
Declaration
public override IReadOnlyList<Module> GetModules(Assembly assembly, bool getResourceModules)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the modules for. |
System.Boolean | getResourceModules | true to include resource modules; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.Module> | An array of modules. |
Overrides
GetModuleVersionId(Module)
Gets a universally unique identifier (UUID) that can be used to distinguish between two versions of a module.
Declaration
public override Guid GetModuleVersionId(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the module version for. |
Returns
Type | Description |
---|---|
System.Guid | A System.Guid that can be used to distinguish between two versions of a module. |
Overrides
GetName(Assembly, Boolean)
Gets an System.Reflection.AssemblyName for the specified assembly
, setting the codebase as specified by copiedName
.
Declaration
public override AssemblyName GetName(Assembly assembly, bool copiedName)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the name for. |
System.Boolean | copiedName | true to set the System.Reflection.Assembly.CodeBase to the location of the assembly after it was shadow copied; false to set System.Reflection.Assembly.CodeBase to the original location. |
Returns
Type | Description |
---|---|
System.Reflection.AssemblyName | An object that contains the fully parsed display name for this assembly. |
Overrides
GetName(MemberInfo)
Gets the name of the member.
Declaration
public override string GetName(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to get the name for. |
Returns
Type | Description |
---|---|
System.String | The name of the member. |
Overrides
GetName(Module)
Gets a String representing the name of the module with the path removed.
Declaration
public override string GetName(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the name for. |
Returns
Type | Description |
---|---|
System.String | The module name with no path. |
Overrides
GetName(ParameterInfo)
Gets the name of the specified parameter.
Declaration
public override string GetName(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the name for. |
Returns
Type | Description |
---|---|
System.String | The name of the specified parameter. |
Overrides
GetNamespace(Type)
Gets the namespace of the specified type
.
Declaration
public override string GetNamespace(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the namespace for. |
Returns
Type | Description |
---|---|
System.String | The namespace of the specified |
Overrides
GetNestedType(Type, String, BindingFlags)
Searches for a nested type with the specified name, using the specified binding constraints.
Declaration
public override Type GetNestedType(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the nested type for. |
System.String | name | The name of the nested type to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Type | An object representing the nested type that matches the specified requirements, if found; otherwise, null. |
Overrides
GetNestedTypes(Type, BindingFlags)
Searches for types nested in the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<Type> GetNestedTypes(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the nested types for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing all nested types defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Type, if no nested types are defined for the specified type, or if none of the nested types methods match the binding constraints. |
Overrides
GetOptionalCustomModifiers(FieldInfo)
Returns an array of types representing the optional custom modifiers of the field.
Declaration
public override IReadOnlyList<Type> GetOptionalCustomModifiers(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to get the modifiers for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that identify the optional custom modifiers of the specified |
Overrides
GetOptionalCustomModifiers(ParameterInfo)
Returns an array of types representing the optional custom modifiers of the parameter.
Declaration
public override IReadOnlyList<Type> GetOptionalCustomModifiers(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the modifiers for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that identify the optional custom modifiers of the specified |
Overrides
GetOptionalCustomModifiers(PropertyInfo)
Returns an array of types representing the optional custom modifiers of the property.
Declaration
public override IReadOnlyList<Type> GetOptionalCustomModifiers(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to get the modifiers for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that identify the optional custom modifiers of the |
Overrides
GetOtherMethods(EventInfo, Boolean)
Returns the public methods that have been associated with an event in metadata using the .other directive.
Declaration
public override IReadOnlyList<MethodInfo> GetOtherMethods(EventInfo event, bool nonPublic)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to get the associated methods for. |
System.Boolean | nonPublic | true if non-public methods can be returned; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of System.Reflection.MethodInfo objects representing the public methods that have been associated with the event in metadata by using the .other directive. If there are no such public methods, an empty array is returned. |
Overrides
GetParameters(MethodBase)
Gets the parameters of the specified method or constructor.
Declaration
public override IReadOnlyList<ParameterInfo> GetParameters(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method or constructor to get the parameters for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.ParameterInfo> | An array of type System.Reflection.ParameterInfo containing information that matches the signature of the method (or constructor) of the specified System.Reflection.MethodBase instance. |
Overrides
GetParameterType(ParameterInfo)
Gets the type of the specified parameter.
Declaration
public override Type GetParameterType(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the type for. |
Returns
Type | Description |
---|---|
System.Type | The type of the specified parameter. |
Overrides
GetPEKind(Module, out PortableExecutableKinds, out ImageFileMachine)
Gets a pair of values indicating the nature of the code in a module and the platform targeted by the module.
Declaration
public override void GetPEKind(Module module, out PortableExecutableKinds peKind, out ImageFileMachine machine)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the PE kind for. |
System.Reflection.PortableExecutableKinds | peKind | When this method returns, a combination of the System.Reflection.PortableExecutableKinds values indicating the nature of the code in the module. |
System.Reflection.ImageFileMachine | machine | When this method returns, one of the System.Reflection.ImageFileMachine values indicating the platform targeted by the module. |
Overrides
GetPosition(ParameterInfo)
Gets the zero-based position of the parameter in the formal parameter list.
Declaration
public override int GetPosition(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the position for. |
Returns
Type | Description |
---|---|
System.Int32 | An integer representing the position the specified parameter occupies in the parameter list. |
Overrides
GetProperties(Type, BindingFlags)
Searches for properties of for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<PropertyInfo> GetProperties(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the properties for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.PropertyInfo> | An array of System.Reflection.PropertyInfo objects representing all properties defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.PropertyInfo, if no properties are defined for the specified type, or if none of the defined properties match the binding constraints. |
Overrides
GetProperty(Type, String, BindingFlags)
Searches for the specified property, using the specified binding constraints.
Declaration
public override PropertyInfo GetProperty(Type type, string name, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the property for. |
System.String | name | The string containing the name of the property to get. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Reflection.PropertyInfo | An object representing the property that matches the specified requirements, if found; otherwise, null. |
Overrides
GetProperty(Type, String, BindingFlags, Binder, Type, Type[], ParameterModifier[])
Searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints.
Declaration
public override PropertyInfo GetProperty(Type type, string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the property for. |
System.String | name | The string containing the name of the property to get. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
System.Reflection.Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection.-or- A null reference, to use the System.Type.DefaultBinder. |
System.Type | returnType | The return type of the property. |
System.Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the indexed property to get.-or- An empty array of the type System.Type to get a property that is not indexed. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
Type | Description |
---|---|
System.Reflection.PropertyInfo | An object representing the property that matches the specified requirements, if found; otherwise, null. |
Overrides
GetProperty(Type, String, Type)
Searches for the specified public property with the specified name and return type.
Declaration
public override PropertyInfo GetProperty(Type type, string name, Type returnType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the property for. |
System.String | name | The string containing the name of the property to get. |
System.Type | returnType | The return type of the property. |
Returns
Type | Description |
---|---|
System.Reflection.PropertyInfo | An object representing the property that matches the specified requirements, if found; otherwise, null. |
Overrides
GetPropertyType(PropertyInfo)
Gets the type of the specified property.
Declaration
public override Type GetPropertyType(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to get the type for. |
Returns
Type | Description |
---|---|
System.Type | The property type type of the property. |
Overrides
GetRaiseMethod(EventInfo, Boolean)
Returns the method that is called when the event is raised, specifying whether to return non-public methods.
Declaration
public override MethodInfo GetRaiseMethod(EventInfo event, bool nonPublic)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to get the raise method for. |
System.Boolean | nonPublic | true if non-public methods can be returned; otherwise, false. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object that was called when the event was raised. |
Overrides
GetRawConstantValue(FieldInfo)
Returns a literal value associated with the field by a compiler.
Declaration
public override object GetRawConstantValue(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field for which to get the literal value. |
Returns
Type | Description |
---|---|
System.Object | An object that contains the literal value associated with the field. If the literal value is a class type with an element value of zero, the return value is null. |
Overrides
GetRawConstantValue(PropertyInfo)
Returns a literal value associated with the property by a compiler.
Declaration
public override object GetRawConstantValue(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property for which to get the literal value. |
Returns
Type | Description |
---|---|
System.Object | An object that contains the literal value associated with the property. If the literal value is a class type with an element value of zero, the return value is null. |
Overrides
GetRawDefaultValue(ParameterInfo)
Gets a value indicating the default value if the parameter has a default value.
Declaration
public override object GetRawDefaultValue(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the default value for. |
Returns
Type | Description |
---|---|
System.Object | The default value of the parameter, or System.DBNull.Value if the parameter has no default value. |
Overrides
GetReferencedAssemblies(Assembly)
Gets the System.Reflection.AssemblyName objects for all the assemblies referenced by the specified assembly
.
Declaration
public override IReadOnlyList<AssemblyName> GetReferencedAssemblies(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the referenced assemblies for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.AssemblyName> | An array that contains the fully parsed display names of all the assemblies referenced by the specified |
Overrides
GetReflectedType(MemberInfo)
Gets the class object that was used to obtain the specified member
.
Declaration
public override Type GetReflectedType(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member for which to get the reflected type. |
Returns
Type | Description |
---|---|
System.Type | The System.Type object through which the specified System.Reflection.MemberInfo object was obtained. |
Overrides
GetReflectionOnly(Assembly)
Gets a System.Boolean value indicating whether specified assembly
was loaded into the reflection-only context.
Declaration
public override bool GetReflectionOnly(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the assembly was loaded into the reflection-only context, rather than the execution context; otherwise, false. |
Overrides
GetRemoveMethod(EventInfo, Boolean)
Retrieves the System.Reflection.MethodInfo object for the System.Reflection.EventInfo.RemoveEventHandler(System.Object,System.Delegate) method of the event, specifying whether to return non-public methods.
Declaration
public override MethodInfo GetRemoveMethod(EventInfo event, bool nonPublic)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to get the remove method for. |
System.Boolean | nonPublic | true if non-public methods can be returned; otherwise, false. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object representing the method used to remove an event handler delegate from the event source. |
Overrides
GetRequiredCustomModifiers(FieldInfo)
Returns an array of types representing the required custom modifiers of the field.
Declaration
public override IReadOnlyList<Type> GetRequiredCustomModifiers(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to get the modifiers for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that identify the required custom modifiers of the specified |
Overrides
GetRequiredCustomModifiers(ParameterInfo)
Returns an array of types representing the required custom modifiers of the parameter.
Declaration
public override IReadOnlyList<Type> GetRequiredCustomModifiers(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the modifiers for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that identify the required custom modifiers of the specified |
Overrides
GetRequiredCustomModifiers(PropertyInfo)
Returns an array of types representing the required custom modifiers of the property.
Declaration
public override IReadOnlyList<Type> GetRequiredCustomModifiers(PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to get the modifiers for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that identify the required custom modifiers of the |
Overrides
GetReturnParameter(MethodInfo)
Gets a System.Reflection.ParameterInfo object that contains information about the return type of the method, such as whether the return type has custom modifiers.
Declaration
public override ParameterInfo GetReturnParameter(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to get the return parameter for. |
Returns
Type | Description |
---|---|
System.Reflection.ParameterInfo | A System.Reflection.ParameterInfo object that contains information about the return type. |
Overrides
GetReturnType(MethodInfo)
Gets the return type of the specified method
.
Declaration
public override Type GetReturnType(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to get the return type for. |
Returns
Type | Description |
---|---|
System.Type | A System.Type object that contains information about the return type. |
Overrides
GetReturnTypeCustomAttributes(MethodInfo)
Gets the custom attributes for the return type of the specified method
.
Declaration
public override ICustomAttributeProvider GetReturnTypeCustomAttributes(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to get the custom attributes for the return type for. |
Returns
Type | Description |
---|---|
System.Reflection.ICustomAttributeProvider | An System.Reflection.ICustomAttributeProvider object representing the custom attributes for the return type. |
Overrides
GetSatelliteAssembly(Assembly, CultureInfo)
Gets the satellite assembly for the specified culture.
Declaration
public override Assembly GetSatelliteAssembly(Assembly assembly, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the satellite assembly from. |
System.Globalization.CultureInfo | culture | The specified culture. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The specified satellite assembly. |
Overrides
GetSatelliteAssembly(Assembly, CultureInfo, Version)
Gets the specified version of the satellite assembly for the specified culture.
Declaration
public override Assembly GetSatelliteAssembly(Assembly assembly, CultureInfo culture, Version version)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the satellite assembly from. |
System.Globalization.CultureInfo | culture | The specified culture. |
System.Version | version | The version of the satellite assembly. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The specified satellite assembly. |
Overrides
GetScopeName(Module)
Gets a string representing the name of the module.
Declaration
public override string GetScopeName(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get the name for. |
Returns
Type | Description |
---|---|
System.String | The module name. |
Overrides
GetSecurityRuleSet(Assembly)
Gets a value that indicates which set of security rules the common language runtime (CLR) enforces for this assembly.
Declaration
public override SecurityRuleSet GetSecurityRuleSet(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the security rules for. |
Returns
Type | Description |
---|---|
System.Security.SecurityRuleSet | The security rule set that the CLR enforces for this assembly. |
Overrides
GetSetMethod(PropertyInfo, Boolean)
Returns the public or non-public set accessor for this property.
Declaration
public override MethodInfo GetSetMethod(PropertyInfo property, bool nonPublic)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property to get the set accessor for. |
System.Boolean | nonPublic | true if non-public methods can be returned; otherwise, false. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object representing the set accessor for this property, if |
Overrides
GetStructLayoutAttribute(Type)
Gets a System.Runtime.InteropServices.StructLayoutAttribute that describes the layout of the specified type
.
Declaration
public override StructLayoutAttribute GetStructLayoutAttribute(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the struct layout attribute for. |
Returns
Type | Description |
---|---|
System.Runtime.InteropServices.StructLayoutAttribute | A System.Runtime.InteropServices.StructLayoutAttribute that describes the gross layout features of the specified |
Overrides
GetType(Assembly, String, Boolean, Boolean)
Gets the System.Type object with the specified name in the specified assembly
, with the options of ignoring the case, and of throwing an exception if the type is not found.
Declaration
public override Type GetType(Assembly assembly, string name, bool throwOnError, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to retrieve the type from. |
System.String | name | The full name of the type. |
System.Boolean | throwOnError | true to throw an exception if the type is not found; false to return null. |
System.Boolean | ignoreCase | true to ignore the case of the type name; otherwise, false. |
Returns
Type | Description |
---|---|
System.Type | An object that represents the specified class. |
Overrides
GetType(Module, String, Boolean, Boolean)
Returns the specified type, specifying whether to make a case-sensitive search of the module and whether to throw an exception if the type cannot be found.
Declaration
public override Type GetType(Module module, string className, bool throwOnError, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
System.String | className | The name of the type to locate. The name must be fully qualified with the namespace. |
System.Boolean | throwOnError | true to throw an exception if the type cannot be found; false to return null. |
System.Boolean | ignoreCase | true for case-insensitive search; otherwise, false. |
Returns
Type | Description |
---|---|
System.Type | A System.Type object representing the specified type, if the type is declared in this module; otherwise, null. |
Overrides
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
public override 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 |
Overrides
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
public override 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 |
Overrides
GetTypeFromCLSID(Guid, String, Boolean)
Gets the type associated with the specified class identifier (CLSID) from the specified server, specifying whether to throw an exception if an error occurs while loading the type.
Declaration
public override Type GetTypeFromCLSID(Guid clsid, string server, bool throwOnError)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | clsid | The CLSID of the type to get. |
System.String | server | The server from which to load the type. If the server name is null, this method automatically reverts to the local machine. |
System.Boolean | throwOnError | true to throw any exception that occurs.-or- false to ignore any exception that occurs. |
Returns
Type | Description |
---|---|
System.Type | System.__ComObject regardless of whether the CLSID is valid. |
Overrides
GetTypeFromHandle(RuntimeTypeHandle)
Gets the type referenced by the specified type handle.
Declaration
public override Type GetTypeFromHandle(RuntimeTypeHandle handle)
Parameters
Type | Name | Description |
---|---|---|
System.RuntimeTypeHandle | handle | The object that refers to the type. |
Returns
Type | Description |
---|---|
System.Type | The type referenced by the specified System.RuntimeTypeHandle, or null if the System.RuntimeTypeHandle.Value property of |
Overrides
GetTypeFromProgID(String, String, Boolean)
Gets the type associated with the specified program identifier (progID) from the specified server, specifying whether to throw an exception if an error occurs while loading the type.
Declaration
public override Type GetTypeFromProgID(string progID, string server, bool throwOnError)
Parameters
Type | Name | Description |
---|---|---|
System.String | progID | The progID of the System.Type to get. |
System.String | server | The server from which to load the type. If the server name is null, this method automatically reverts to the local machine. |
System.Boolean | throwOnError | true to throw any exception that occurs.-or- false to ignore any exception that occurs. |
Returns
Type | Description |
---|---|
System.Type | The type associated with the specified program identifier (progID), if |
Overrides
GetTypeHandle(Type)
Gets the handle for the specified type
.
Declaration
public override RuntimeTypeHandle GetTypeHandle(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the runtime handle for. |
Returns
Type | Description |
---|---|
System.RuntimeTypeHandle | The handle for the specified |
Overrides
GetTypes(Assembly)
Gets the types defined in the specified assembly
.
Declaration
public override IReadOnlyList<Type> GetTypes(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to retrieve the types from. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array that contains all the types that are defined in this assembly. |
Overrides
GetTypes(Module)
Returns all the types defined within the specified module
.
Declaration
public override IReadOnlyList<Type> GetTypes(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of type System.Type containing types defined within the module that is reflected by this instance. |
Overrides
Remarks
Note to implementers: Please ensure that FindTypes(Module, TypeFilter, Object) and GetTypes(Module) have consistent behavior. When overriding this method, make sure that similar methods provide consistent results.
GetUnderlyingSystemType(Type)
Indicates the type provided by the common language runtime that represents the specified type
.
Declaration
public override Type GetUnderlyingSystemType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the underlying type for. |
Returns
Type | Description |
---|---|
System.Type | The underlying system type for the specified |
Overrides
GetValue(FieldInfo, Object)
Gets the value of a field.
Declaration
public override object GetValue(FieldInfo field, object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to get the value from. |
System.Object | obj | The object whose field value will be retrieved, or null for a static field. |
Returns
Type | Description |
---|---|
System.Object | The value of the field. |
Overrides
GetValue(PropertyInfo, Object, BindingFlags, Binder, Object[], CultureInfo)
Returns the property value of a specified object that has the specified binding, index, and culture-specific information.
Declaration
public override object GetValue(PropertyInfo property, object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property for which to get the value. |
System.Object | obj | The object whose property value will be returned. |
System.Reflection.BindingFlags | invokeAttr | A bitwise combination of the following enumeration members that specify the invocation attribute: InvokeMethod, CreateInstance, Static, GetField, SetField, GetProperty, and SetProperty. You must specify a suitable invocation attribute. For example, to invoke a static member, set the Static flag. |
System.Reflection.Binder | binder | A System.Reflection.Binder that defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection. If binder is null, then System.Type.DefaultBinder is used. |
System.Object[] | index | Optional index values for indexed properties. This value should be null for non-indexed properties. |
System.Globalization.CultureInfo | culture | A System.Globalization.CultureInfo used to govern the coercion of types. If this is null, the System.Globalization.CultureInfo for the current thread is used. |
Returns
Type | Description |
---|---|
System.Object | The property value of the specified object. |
Overrides
HasDefaultValue(ParameterInfo)
Gets a value indicating whether the specified parameter has a default value.
Declaration
public override bool HasDefaultValue(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to check for a default value. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified parameter has a default value; otherwise, false. |
Overrides
HasElementType(Type)
Gets a value indicating whether the specified type
encompasses or refers to another type; that is, whether the specified type
is an array, a pointer, or is passed by reference.
Declaration
public override bool HasElementType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
Invoke(ConstructorInfo, BindingFlags, Binder, Object[], CultureInfo)
Invokes the constructor with the specified arguments, under the constraints of the specified System.Reflection.Binder.
Declaration
public override object Invoke(ConstructorInfo constructor, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ConstructorInfo | constructor | The constructor to invoke. |
System.Reflection.BindingFlags | invokeAttr | One of the System.Reflection.BindingFlags values that specifies the type of binding. |
System.Reflection.Binder | binder | A System.Reflection.Binder that defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection. If binder is null, then System.Type.DefaultBinder is used. |
System.Object[] | parameters | An array of type Object used to match the number, order and type of the parameters for this constructor, under the constraints of binder. If this constructor does not require parameters, pass an array with zero elements. |
System.Globalization.CultureInfo | culture | A System.Globalization.CultureInfo used to govern the coercion of types. If this is null, the System.Globalization.CultureInfo for the current thread is used. |
Returns
Type | Description |
---|---|
System.Object | An instance of the class associated with the constructor. |
Overrides
Invoke(MethodBase, Object, BindingFlags, Binder, Object[], CultureInfo)
Invokes the reflected method or constructor with the given parameters.
Declaration
public override object Invoke(MethodBase method, object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | |
System.Object | obj | The object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor. |
System.Reflection.BindingFlags | invokeAttr | One of the System.Reflection.BindingFlags values that specifies the type of binding. |
System.Reflection.Binder | binder | A System.Reflection.Binder that defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection. If binder is null, then System.Type.DefaultBinder is used. |
System.Object[] | parameters | An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, this should be null. |
System.Globalization.CultureInfo | culture | A System.Globalization.CultureInfo used to govern the coercion of types. If this is null, the System.Globalization.CultureInfo for the current thread is used. |
Returns
Type | Description |
---|---|
System.Object | An object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. |
Overrides
InvokeMember(Type, String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])
Invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers and culture.
Declaration
public override object InvokeMember(Type type, string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to invoke a member on. |
System.String | name | The string containing the name of the constructor, method, property, or field member to invoke. |
System.Reflection.BindingFlags | invokeAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. The access can be one of the BindingFlags such as Public, NonPublic, Private, InvokeMethod, GetField, and so on. The type of lookup need not be specified. If the type of lookup is omitted, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static are used. |
System.Reflection.Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. If binder is null, then System.Type.DefaultBinder is used. |
System.Object | target | The object on which to invoke the specified member. |
System.Object[] | args | An array containing the arguments to pass to the member to invoke. |
System.Reflection.ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the args array. A parameter's associated attributes are stored in the member's signature. The default binder processes this parameter only when calling a COM component. |
System.Globalization.CultureInfo | culture | The System.Globalization.CultureInfo object representing the globalization locale to use, which may be necessary for locale-specific conversions, such as converting a numeric String to a Double. If this is null, the System.Globalization.CultureInfo for the current thread is used. |
System.String[] | namedParameters | An array containing the names of the parameters to which the values in the args array are passed. |
Returns
Type | Description |
---|---|
System.Object | An object representing the return value of the invoked member. |
Overrides
IsArray(Type)
Gets a value indicating whether the specified type
is an array.
Declaration
public override bool IsArray(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsAssignableFrom(Type, Type)
Determines whether an instance of the specified type
can be assigned from an instance of the specified type c
.
Declaration
public override bool IsAssignableFrom(Type type, Type c)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check for assignment compatibility. |
System.Type | c | The type to compare with the specified |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Overrides
IsByRef(Type)
Gets a value indicating whether the specified type
is passed by reference.
Declaration
public override bool IsByRef(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsCOMObject(Type)
Gets a value indicating whether the specified type
is a COM object.
Declaration
public override bool IsCOMObject(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsConstructedGenericType(Type)
Gets a value indicating whether the specified type
is a constructed generic type.
Declaration
public override bool IsConstructedGenericType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsContextful(Type)
Gets a value indicating whether the specified type
can be hosted in a context.
Declaration
public override bool IsContextful(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsDefined(Assembly, Type, Boolean)
Determines whether the custom attribute of the specified attributeType
type or its derived types is applied to the specified assembly
.
Declaration
public override bool IsDefined(Assembly assembly, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to check the custom attribute on. |
System.Type | attributeType | The type of attribute to search for. |
System.Boolean | inherit | This argument is ignored for objects of this type. |
Returns
Type | Description |
---|---|
System.Boolean | true if one or more instances of |
Overrides
IsDefined(MemberInfo, Type, Boolean)
Determines whether the custom attribute of the specified attributeType
type or its derived types is applied to the specified member
.
Declaration
public override bool IsDefined(MemberInfo member, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to check the custom attribute on. |
System.Type | attributeType | The type of attribute to search for. |
System.Boolean | inherit | This argument is ignored for objects of this type. |
Returns
Type | Description |
---|---|
System.Boolean | true if one or more instances of |
Overrides
IsDefined(Module, Type, Boolean)
Determines whether the custom attribute of the specified attributeType
type or its derived types is applied to the specified module
.
Declaration
public override bool IsDefined(Module module, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to check the custom attribute on. |
System.Type | attributeType | The type of attribute to search for. |
System.Boolean | inherit | This argument is ignored for objects of this type. |
Returns
Type | Description |
---|---|
System.Boolean | true if one or more instances of |
Overrides
IsDefined(ParameterInfo, Type, Boolean)
Determines whether the custom attribute of the specified attributeType
type or its derived types is applied to the specified parameter
.
Declaration
public override bool IsDefined(ParameterInfo parameter, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to check the custom attribute on. |
System.Type | attributeType | The type of attribute to search for. |
System.Boolean | inherit | This argument is ignored for objects of this type. |
Returns
Type | Description |
---|---|
System.Boolean | true if one or more instances of |
Overrides
IsDynamic(Assembly)
Gets a value that indicates whether the current assembly was generated dynamically in the current process by using reflection emit.
Declaration
public override bool IsDynamic(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current assembly was generated dynamically in the current process; otherwise, false. |
Overrides
IsEquivalentTo(Type, Type)
Determines whether two COM types have the same identity and are eligible for type equivalence.
Declaration
public override bool IsEquivalentTo(Type type, Type other)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The COM type that is tested for equivalence with the other type. |
System.Type | other | The COM type that is tested for equivalence with the specified type. |
Returns
Type | Description |
---|---|
System.Boolean | true if the COM types are equivalent; otherwise, false. This method also returns false if one type is in an assembly that is loaded for execution, and the other is in an assembly that is loaded into the reflection-only context. |
Overrides
IsFullyTrusted(Assembly)
Gets a value that indicates whether the current assembly is loaded with full trust.
Declaration
public override bool IsFullyTrusted(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current assembly is loaded with full trust; otherwise, false. |
Overrides
IsGenericMethod(MethodBase)
Gets a value indicating whether the specified method is generic.
Declaration
public override bool IsGenericMethod(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsGenericMethodDefinition(MethodBase)
Gets a value indicating whether the specified method is a generic method definition.
Declaration
public override bool IsGenericMethodDefinition(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsGenericParameter(Type)
Gets a value indicating whether the specified type
represents a type parameter in the definition of a generic type or method.
Declaration
public override bool IsGenericParameter(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsGenericType(Type)
Gets a value indicating whether the specified type
is a generic type.
Declaration
public override bool IsGenericType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsGenericTypeDefinition(Type)
Gets a value indicating whether the specified type
represents a generic type definition, from which other generic types can be constructed.
Declaration
public override bool IsGenericTypeDefinition(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsInstanceOfType(Type, Object)
Determines whether the specified object is an instance of the specified type
.
Declaration
public override bool IsInstanceOfType(Type type, object o)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to compare the object against. |
System.Object | o | The object to compare with the specified type. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsInterface(Type)
Gets a value indicating whether the specified type
is an interface type.
Declaration
public override bool IsInterface(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsMarshalByRef(Type)
Gets a value indicating whether the specified type
is marshaled by reference.
Declaration
public override bool IsMarshalByRef(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsMulticast(EventInfo)
Gets a value indicating whether the event is multicast.
Declaration
public override bool IsMulticast(EventInfo event)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to check for multicast. |
Returns
Type | Description |
---|---|
System.Boolean | true if the delegate is an instance of a multicast delegate; otherwise, false. |
Overrides
IsPointer(Type)
Gets a value indicating whether the specified type
is a pointer.
Declaration
public override bool IsPointer(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsPrimitive(Type)
Gets a value indicating whether the specified type
is one of the primitive types.
Declaration
public override bool IsPrimitive(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsResource(Module)
Gets a value indicating whether the object is a resource.
Declaration
public override bool IsResource(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the object is a resource; otherwise, false. |
Overrides
IsSecurityCritical(FieldInfo)
Gets a value that indicates whether the specified field
is security-critical or security-safe-critical at the current trust level, and therefore can perform critical operations.
Declaration
public override bool IsSecurityCritical(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsSecurityCritical(MethodBase)
Gets a value that indicates whether the specified method or constructor is security-critical or security-safe-critical at the current trust level, and therefore can perform critical operations.
Declaration
public override bool IsSecurityCritical(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current method or constructor is security-critical or security-safe-critical at the current trust level; false if it is transparent. |
Overrides
IsSecurityCritical(Type)
Gets a value that indicates whether the specified type
is security-critical or security-safe-critical at the current trust level, and therefore can perform critical operations.
Declaration
public override bool IsSecurityCritical(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsSecuritySafeCritical(FieldInfo)
Gets a value that indicates whether the specified field
is security-safe-critical at the current trust level; that is, whether it can perform critical operations and can be accessed by transparent code.
Declaration
public override bool IsSecuritySafeCritical(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsSecuritySafeCritical(MethodBase)
Gets a value that indicates whether the specified method or constructor is security-safe-critical at the current trust level; that is, whether it can perform critical operations and can be accessed by transparent code.
Declaration
public override bool IsSecuritySafeCritical(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the method or constructor is security-safe-critical at the current trust level; false if it is security-critical or transparent. |
Overrides
IsSecuritySafeCritical(Type)
Gets a value that indicates whether the specified type
is security-safe-critical at the current trust level; that is, whether it can perform critical operations and can be accessed by transparent code.
Declaration
public override bool IsSecuritySafeCritical(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsSecurityTransparent(FieldInfo)
Gets a value that indicates whether the specified field
is transparent at the current trust level, and therefore cannot perform critical operations.
Declaration
public override bool IsSecurityTransparent(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsSecurityTransparent(MethodBase)
Gets a value that indicates whether the specified method or constructor is transparent at the current trust level, and therefore cannot perform critical operations.
Declaration
public override bool IsSecurityTransparent(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the method or constructor is security-transparent at the current trust level; otherwise, false. |
Overrides
IsSecurityTransparent(Type)
Gets a value that indicates whether the specified type
is transparent at the current trust level, and therefore cannot perform critical operations.
Declaration
public override bool IsSecurityTransparent(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsSerializable(Type)
Gets a value indicating whether the System.Type is serializable.
Declaration
public override bool IsSerializable(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsSubclassOf(Type, Type)
Determines whether the class represented by the specified type
derives from the class represented by the specified type c
.
Declaration
public override bool IsSubclassOf(Type type, Type c)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check for being a subclass. |
System.Type | c | The type to compare with the specified type. |
Returns
Type | Description |
---|---|
System.Boolean | true if the type represented by the |
Overrides
IsValueType(Type)
Gets a value indicating whether the specified type
is a value type.
Declaration
public override bool IsValueType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
IsVisible(Type)
Gets a value indicating whether the specified type
can be accessed by code outside the assembly.
Declaration
public override bool IsVisible(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified |
Overrides
Load(AssemblyName)
Loads an assembly given its System.Reflection.AssemblyName.
Declaration
public override Assembly Load(AssemblyName assemblyRef)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.AssemblyName | assemblyRef | The object that describes the assembly to be loaded. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The loaded assembly. |
Overrides
Load(String)
Loads an assembly given the long form of its name.
Declaration
public override Assembly Load(string assemblyString)
Parameters
Type | Name | Description |
---|---|---|
System.String | assemblyString | The long form of the assembly name. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The loaded assembly. |
Overrides
LoadFile(String)
Loads the contents of an assembly file on the specified path.
Declaration
public override Assembly LoadFile(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the file to load. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The loaded assembly. |
Overrides
LoadFrom(String, Byte[], AssemblyHashAlgorithm)
Loads an assembly given its file name or path, hash value, and hash algorithm.
Declaration
public override Assembly LoadFrom(string assemblyFile, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
Parameters
Type | Name | Description |
---|---|---|
System.String | assemblyFile | The name or path of the file that contains the manifest of the assembly. |
System.Byte[] | hashValue | The value of the computed hash code. |
System.Configuration.Assemblies.AssemblyHashAlgorithm | hashAlgorithm | The hash algorithm used for hashing files and for generating the strong name. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The loaded assembly. |
Overrides
LoadModule(Assembly, String, Byte[], Byte[])
Loads the module, internal to the specified assembly
, with a common object file format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded.
Declaration
public override Module LoadModule(Assembly assembly, string moduleName, byte[] rawModule, byte[] rawSymbolStore)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to load the module into. |
System.String | moduleName | The name of the module. This string must correspond to a file name in this assembly's manifest. |
System.Byte[] | rawModule | A byte array that is a COFF-based image containing an emitted module, or a resource. |
System.Byte[] | rawSymbolStore | A byte array containing the raw bytes representing the symbols for the module. Must be null if this is a resource file. |
Returns
Type | Description |
---|---|
System.Reflection.Module | The loaded module. |
Overrides
MakeArrayType(Type)
Makes a single-dimensional (vector) array type with the specified element type.
Declaration
public override Type MakeArrayType(Type elementType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | elementType | The element type of the array. |
Returns
Type | Description |
---|---|
System.Type | A single-dimensional (vector) array type with the specified element type. |
Overrides
MakeArrayType(Type, Int32)
Makes a multi-dimensional array type with the specified element type and rank.
Declaration
public override Type MakeArrayType(Type elementType, int rank)
Parameters
Type | Name | Description |
---|---|---|
System.Type | elementType | The element type of the array. |
System.Int32 | rank | The rank of the multi-dimensional array. |
Returns
Type | Description |
---|---|
System.Type | A multi-dimensional array type with the specified element type and rank. |
Overrides
MakeByRefType(Type)
Makes a by-ref type with the specified underlying element type.
Declaration
public override Type MakeByRefType(Type elementType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | elementType | The underlying element type. |
Returns
Type | Description |
---|---|
System.Type | A by-ref type with the specified underlying element type. |
Overrides
MakeGenericMethod(MethodInfo, Type[])
Makes a generic method with the specified generic method definition and type arguments.
Declaration
public override MethodInfo MakeGenericMethod(MethodInfo genericMethodDefinition, params Type[] typeArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | genericMethodDefinition | The generic method definition. |
System.Type[] | typeArguments | The type arguments. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A generic method with the specified generic method definition and type arguments. |
Overrides
MakeGenericType(Type, Type[])
Makes a generic type with the specified generic type definition and type arguments.
Declaration
public override Type MakeGenericType(Type genericTypeDefinition, params Type[] typeArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Type | genericTypeDefinition | The generic type definition. |
System.Type[] | typeArguments | The type arguments. |
Returns
Type | Description |
---|---|
System.Type | A generic type with the specified generic type definition and type arguments. |
Overrides
MakePointerType(Type)
Makes a pointer type with the specified underlying element type.
Declaration
public override Type MakePointerType(Type elementType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | elementType | The underlying element type. |
Returns
Type | Description |
---|---|
System.Type | A pointer type with the specified underlying element type. |
Overrides
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
public override 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 |
Overrides
ReflectionOnlyLoad(Byte[])
Loads the assembly from a common object file format (COFF)-based image containing an emitted assembly. The assembly is loaded into the reflection-only context of the caller's application domain.
Declaration
public override Assembly ReflectionOnlyLoad(byte[] rawAssembly)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | rawAssembly | A byte array that is a COFF-based image containing an emitted assembly. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The loaded assembly. |
Overrides
ReflectionOnlyLoad(String)
Loads an assembly into the reflection-only context, given its display name.
Declaration
public override Assembly ReflectionOnlyLoad(string assemblyString)
Parameters
Type | Name | Description |
---|---|---|
System.String | assemblyString | The display name of the assembly, as returned by the System.Reflection.AssemblyName.FullName property. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The loaded assembly. |
Overrides
ReflectionOnlyLoadFrom(String)
Loads an assembly into the reflection-only context, given its path.
Declaration
public override Assembly ReflectionOnlyLoadFrom(string assemblyFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | assemblyFile | The path of the file that contains the manifest of the assembly. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The loaded assembly. |
Overrides
RemoveEventHandler(EventInfo, Object, Delegate)
Removes an event handler from an event source.
Declaration
public override void RemoveEventHandler(EventInfo event, object target, Delegate handler)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to remove a handler from. |
System.Object | target | The event source. |
System.Delegate | handler | The delegate to be disassociated from the events raised by target. |
Overrides
RemoveModuleResolve(Assembly, ModuleResolveEventHandler)
Removes a module resolve handler.
Declaration
public override void RemoveModuleResolve(Assembly assembly, ModuleResolveEventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to remove a module resolve handler for. |
System.Reflection.ModuleResolveEventHandler | handler | The module resolve handler to remove. |
Overrides
Remarks
Occurs when the common language runtime class loader cannot resolve a reference to an internal module of an assembly through normal means.
ResolveField(Module, Int32, Type[], Type[])
Returns the field identified by the specified metadata token, in the context defined by the specified generic type parameters.
Declaration
public override FieldInfo ResolveField(Module module, int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to resolve the metadata token in. |
System.Int32 | metadataToken | A metadata token that identifies a field in the module. |
System.Type[] | genericTypeArguments | An array of System.Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic. |
System.Type[] | genericMethodArguments | An array of System.Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic. |
Returns
Type | Description |
---|---|
System.Reflection.FieldInfo | A System.Reflection.FieldInfo object representing the field that is identified by the specified metadata token. |
Overrides
ResolveMember(Module, Int32, Type[], Type[])
Returns the type or member identified by the specified metadata token, in the context defined by the specified generic type parameters.
Declaration
public override MemberInfo ResolveMember(Module module, int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to resolve the metadata token in. |
System.Int32 | metadataToken | A metadata token that identifies a type or member in the module. |
System.Type[] | genericTypeArguments | An array of System.Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic. |
System.Type[] | genericMethodArguments | An array of System.Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic. |
Returns
Type | Description |
---|---|
System.Reflection.MemberInfo | A System.Reflection.MemberInfo object representing the type or member that is identified by the specified metadata token. |
Overrides
ResolveMethod(Module, Int32, Type[], Type[])
Returns the method or constructor identified by the specified metadata token, in the context defined by the specified generic type parameters.
Declaration
public override MethodBase ResolveMethod(Module module, int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to resolve the metadata token in. |
System.Int32 | metadataToken | A metadata token that identifies a method or constructor in the module. |
System.Type[] | genericTypeArguments | An array of System.Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic. |
System.Type[] | genericMethodArguments | An array of System.Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic. |
Returns
Type | Description |
---|---|
System.Reflection.MethodBase | A System.Reflection.MethodBase object representing the method that is identified by the specified metadata token. |
Overrides
ResolveSignature(Module, Int32)
Returns the signature blob identified by a metadata token.
Declaration
public override byte[] ResolveSignature(Module module, int metadataToken)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to resolve the metadata token in. |
System.Int32 | metadataToken | A metadata token that identifies a signature in the module. |
Returns
Type | Description |
---|---|
System.Byte[] | An array of bytes representing the signature blob. |
Overrides
ResolveString(Module, Int32)
Returns the string identified by the specified metadata token.
Declaration
public override string ResolveString(Module module, int metadataToken)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to resolve the metadata token in. |
System.Int32 | metadataToken | A metadata token that identifies a string in the string heap of the module. |
Returns
Type | Description |
---|---|
System.String | A System.String containing a string value from the metadata string heap. |
Overrides
ResolveType(Module, Int32, Type[], Type[])
Returns the type identified by the specified metadata token, in the context defined by the specified generic type parameters.
Declaration
public override Type ResolveType(Module module, int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to resolve the metadata token in. |
System.Int32 | metadataToken | A metadata token that identifies a type in the module. |
System.Type[] | genericTypeArguments | An array of System.Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic. |
System.Type[] | genericMethodArguments | An array of System.Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic. |
Returns
Type | Description |
---|---|
System.Type | A System.Type object representing the type that is identified by the specified metadata token. |
Overrides
SetValue(FieldInfo, Object, Object, BindingFlags, Binder, CultureInfo)
Sets the value of a field.
Declaration
public override void SetValue(FieldInfo field, object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field to set the value on. |
System.Object | obj | The object whose field value will be set, or null for a static field. |
System.Object | value | The value to assign to the field. |
System.Reflection.BindingFlags | invokeAttr | One of the System.Reflection.BindingFlags values that specifies the type of binding. |
System.Reflection.Binder | binder | A System.Reflection.Binder that defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection. If binder is null, then System.Type.DefaultBinder is used. |
System.Globalization.CultureInfo | culture | A System.Globalization.CultureInfo used to govern the coercion of types. If this is null, the System.Globalization.CultureInfo for the current thread is used. |
Overrides
SetValue(PropertyInfo, Object, Object, BindingFlags, Binder, Object[], CultureInfo)
Sets the property value for a specified object that has the specified binding, index, and culture-specific information.
Declaration
public override void SetValue(PropertyInfo property, object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | property | The property for which to set the value. |
System.Object | obj | The object whose property value will be set. |
System.Object | value | The new property value. |
System.Reflection.BindingFlags | invokeAttr | A bitwise combination of the following enumeration members that specify the invocation attribute: InvokeMethod, CreateInstance, Static, GetField, SetField, GetProperty, or SetProperty. You must specify a suitable invocation attribute. For example, to invoke a static member, set the Static flag. |
System.Reflection.Binder | binder | A System.Reflection.Binder that defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection. If binder is null, then System.Type.DefaultBinder is used. |
System.Object[] | index | Optional index values for indexed properties. This value should be null for non-indexed properties. |
System.Globalization.CultureInfo | culture | A System.Globalization.CultureInfo used to govern the coercion of types. If this is null, the System.Globalization.CultureInfo for the current thread is used. |
Overrides
UnsafeLoadFrom(String)
Loads an assembly into the load-from context, bypassing some security checks.
Declaration
public override Assembly UnsafeLoadFrom(string assemblyFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | assemblyFile | The name or path of the file that contains the manifest of the assembly. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | The loaded assembly. |