AttributeTableBuilder.AddCustomAttributes 方法

定义

将所提供的属性的内容添加到此生成器。

重载

名称 说明
AddCustomAttributes(Type, Attribute[])

将所提供的属性的内容添加到此生成器。

AddCustomAttributes(Type, MemberDescriptor, Attribute[])

将所提供的属性的内容添加到此生成器。

AddCustomAttributes(Type, MemberInfo, Attribute[])

将所提供的属性的内容添加到此生成器。

AddCustomAttributes(Type, String, Attribute[])

将所提供的属性的内容添加到此生成器。

AddCustomAttributes(Type, DependencyProperty, Attribute[])

将所提供的属性的内容添加到此生成器。

注解

如果属性与生成器中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。

生成大型属性表时,用于 AddCallback 延迟创建属性的工作,直到需要它们。

AddCustomAttributes(Type, Attribute[])

将所提供的属性的内容添加到此生成器。

public:
 void AddCustomAttributes(Type ^ type, ... cli::array <Attribute ^> ^ attributes);
public void AddCustomAttributes(Type type, params Attribute[] attributes);
member this.AddCustomAttributes : Type * Attribute[] -> unit
Public Sub AddCustomAttributes (type As Type, ParamArray attributes As Attribute())

参数

type
Type

要向其添加类级属性的类型。

attributes
Attribute[]

添加到生成器的属性。

例外

typeattributesnull.

注解

如果属性与生成器中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。

生成大型属性表时,用于 AddCallback 延迟创建属性的工作,直到需要它们。

适用于

AddCustomAttributes(Type, MemberDescriptor, Attribute[])

将所提供的属性的内容添加到此生成器。

public:
 void AddCustomAttributes(Type ^ ownerType, System::ComponentModel::MemberDescriptor ^ descriptor, ... cli::array <Attribute ^> ^ attributes);
public void AddCustomAttributes(Type ownerType, System.ComponentModel.MemberDescriptor descriptor, params Attribute[] attributes);
member this.AddCustomAttributes : Type * System.ComponentModel.MemberDescriptor * Attribute[] -> unit
Public Sub AddCustomAttributes (ownerType As Type, descriptor As MemberDescriptor, ParamArray attributes As Attribute())

参数

ownerType
Type

包含由 descriptor. 标识的成员的类型。

descriptor
MemberDescriptor

将属性添加到的事件或属性信息。

attributes
Attribute[]

添加到生成器的属性。

例外

ownerTypedescriptorattributesnull

注解

如果属性与生成器中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。

生成大型属性表时,用于 AddCallback 延迟创建属性的工作,直到需要它们。

适用于

AddCustomAttributes(Type, MemberInfo, Attribute[])

将所提供的属性的内容添加到此生成器。

public:
 void AddCustomAttributes(Type ^ ownerType, System::Reflection::MemberInfo ^ member, ... cli::array <Attribute ^> ^ attributes);
public void AddCustomAttributes(Type ownerType, System.Reflection.MemberInfo member, params Attribute[] attributes);
member this.AddCustomAttributes : Type * System.Reflection.MemberInfo * Attribute[] -> unit
Public Sub AddCustomAttributes (ownerType As Type, member As MemberInfo, ParamArray attributes As Attribute())

参数

ownerType
Type

包含由 member. 标识的成员的类型。

member
MemberInfo

将属性添加到的事件或属性信息。

attributes
Attribute[]

添加到生成器的属性。

例外

ownerTypememberattributesnull

注解

如果属性与生成器中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。

生成大型属性表时,用于 AddCallback 延迟创建属性的工作,直到需要它们。

适用于

AddCustomAttributes(Type, String, Attribute[])

将所提供的属性的内容添加到此生成器。

public:
 void AddCustomAttributes(Type ^ ownerType, System::String ^ memberName, ... cli::array <Attribute ^> ^ attributes);
public void AddCustomAttributes(Type ownerType, string memberName, params Attribute[] attributes);
member this.AddCustomAttributes : Type * string * Attribute[] -> unit
Public Sub AddCustomAttributes (ownerType As Type, memberName As String, ParamArray attributes As Attribute())

参数

ownerType
Type

包含由 memberName. 标识的成员的类型。

memberName
String

将属性添加到的事件或属性信息的名称。

attributes
Attribute[]

添加到生成器的属性。

例外

ownerTypememberNameattributesnull

注解

如果属性与生成器中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。

生成大型属性表时,用于 AddCallback 延迟创建属性的工作,直到需要它们。

适用于

AddCustomAttributes(Type, DependencyProperty, Attribute[])

将所提供的属性的内容添加到此生成器。

public:
 void AddCustomAttributes(Type ^ ownerType, System::Windows::DependencyProperty ^ dp, ... cli::array <Attribute ^> ^ attributes);
public void AddCustomAttributes(Type ownerType, System.Windows.DependencyProperty dp, params Attribute[] attributes);
member this.AddCustomAttributes : Type * System.Windows.DependencyProperty * Attribute[] -> unit
Public Sub AddCustomAttributes (ownerType As Type, dp As DependencyProperty, ParamArray attributes As Attribute())

参数

ownerType
Type

包含由 dp. 标识的依赖项的类型。

dp
DependencyProperty

要向其添加属性的依赖属性。

attributes
Attribute[]

添加到生成器的属性。

例外

ownerTypedpattributesnull

注解

如果属性与生成器中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。

生成大型属性表时,用于 AddCallback 延迟创建属性的工作,直到需要它们。

适用于