CustomReflectionContext 类

定义

表示可自定义的反射上下文。

public ref class CustomReflectionContext abstract : System::Reflection::ReflectionContext
public abstract class CustomReflectionContext : System.Reflection.ReflectionContext
type CustomReflectionContext = class
    inherit ReflectionContext
Public MustInherit Class CustomReflectionContext
Inherits ReflectionContext
继承
CustomReflectionContext
派生

注解

有关此 API 的详细信息,请参阅 CustomReflectionContext 的补充 API 备注

构造函数

名称 说明
CustomReflectionContext()

初始化 CustomReflectionContext 类的新实例。

CustomReflectionContext(ReflectionContext)

使用指定的反射上下文作为基初始化类的新实例 CustomReflectionContext

方法

名称 说明
AddProperties(Type)

在派生类中重写时,提供指定类型的附加属性集合,如此反射上下文中所示。

CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>, IEnumerable<Attribute>, IEnumerable<Attribute>, IEnumerable<Attribute>)

创建一个对象,该对象表示要添加到某一类型的属性,该属性用于 AddProperties(Type) 该方法和使用指定的自定义属性。

CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>)

创建一个对象,该对象表示要添加到类型中的属性,以便与该方法一起使用 AddProperties(Type)

Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetCustomAttributes(MemberInfo, IEnumerable<Object>)

在派生类中重写时,提供指定成员的自定义属性列表,如此反射上下文中所示。

GetCustomAttributes(ParameterInfo, IEnumerable<Object>)

在派生类中重写时,提供指定参数的自定义属性列表,如此反射上下文中所示。

GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
GetTypeForObject(Object)

获取此反射上下文中指定对象的类型的表示形式。

(继承自 ReflectionContext)
MapAssembly(Assembly)

在此反射上下文中,获取由另一反射上下文中的对象表示的程序集的表示形式。

MapType(TypeInfo)

在此反射上下文中,获取由另一反射上下文中的对象表示的类型表示的表示形式。

MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于