TypeDescriptionProvider.GetReflectionType 方法

定义

针对某个对象执行正常反射。

重载

GetReflectionType(Object)

针对给定对象执行正常反射。

GetReflectionType(Type)

针对某个类型执行正常反射。

GetReflectionType(Type, Object)

针对具有给定类型的给定对象执行正常反射。

GetReflectionType(Object)

Source:
TypeDescriptionProvider.cs
Source:
TypeDescriptionProvider.cs
Source:
TypeDescriptionProvider.cs

针对给定对象执行正常反射。

public:
 Type ^ GetReflectionType(System::Object ^ instance);
public Type GetReflectionType (object instance);
member this.GetReflectionType : obj -> Type
Public Function GetReflectionType (instance As Object) As Type

参数

instance
Object

类型的实例(不应为 null)。

返回

instance 的反射的类型。

例外

instancenull

注解

方法 GetReflectionType 是 方法的 GetTypeDescriptor 较低级别版本。 如果无法找到对象的自定义类型描述符, GetReflectionType 则调用 以对该对象执行正常反射。

如果调用了使用实例而不是类型的类型描述符成员,请使用此方法重载。

另请参阅

适用于

GetReflectionType(Type)

Source:
TypeDescriptionProvider.cs
Source:
TypeDescriptionProvider.cs
Source:
TypeDescriptionProvider.cs

针对某个类型执行正常反射。

public:
 Type ^ GetReflectionType(Type ^ objectType);
public Type GetReflectionType (Type objectType);
member this.GetReflectionType : Type -> Type
Public Function GetReflectionType (objectType As Type) As Type

参数

objectType
Type

要为其检索 IReflect 的对象的类型。

返回

objectType 的反射的类型。

例外

objectTypenull

注解

方法 GetReflectionType 是 方法的 GetTypeDescriptor 较低级别版本。 如果无法找到对象的自定义类型描述符, GetReflectionType 则调用 以对该对象执行正常反射。

如果调用了使用类型而不是实例的类型描述符成员,请使用此方法重载。

另请参阅

适用于

GetReflectionType(Type, Object)

Source:
TypeDescriptionProvider.cs
Source:
TypeDescriptionProvider.cs
Source:
TypeDescriptionProvider.cs

针对具有给定类型的给定对象执行正常反射。

public:
 virtual Type ^ GetReflectionType(Type ^ objectType, System::Object ^ instance);
public virtual Type GetReflectionType (Type objectType, object instance);
public virtual Type GetReflectionType (Type objectType, object? instance);
abstract member GetReflectionType : Type * obj -> Type
override this.GetReflectionType : Type * obj -> Type
Public Overridable Function GetReflectionType (objectType As Type, instance As Object) As Type

参数

objectType
Type

要为其检索 IReflect 的对象的类型。

instance
Object

该类型的实例。 可以为 null

返回

objectType 的反射的类型。

注解

方法 GetReflectionType 是 方法的 GetTypeDescriptor 较低级别版本。 如果无法找到对象的自定义类型描述符, GetReflectionType 则调用 以对该对象执行正常反射。

继承者说明

此方法原型为 virtual,如果未传递父提供程序,则默认返回 objectType 。 如果传递了父提供程序,此方法将调用父提供程序的 GetReflectionType 方法。

另请参阅

适用于