AttributeCallbackBuilder.AddCustomAttributes 方法

定义

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

重载

AddCustomAttributes(Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

AddCustomAttributes(MemberDescriptor, Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

AddCustomAttributes(MemberInfo, Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

AddCustomAttributes(String, Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

AddCustomAttributes(DependencyProperty, Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

注解

如果某个特性与表中已经包含的另一个特性发生冲突,则所添加的最新特性将取代以前的特性。If an attribute conflicts with another attribute already included in the table, the last attribute added replaces previous attributes.

只能将特性添加到由 CallbackType 指定的类型中。Attributes can be added only to the type specified by CallbackType.

AddCustomAttributes(Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

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

参数

attributes
Attribute[]

要添加到表中的特性。The attributes that are added to the table.

例外

attributesnullattributes is null.

注解

如果某个特性与表中已经包含的另一个特性发生冲突,则所添加的最新特性将取代以前的特性。If an attribute conflicts with another attribute already included in the table, the last attribute added replaces previous attributes.

只能将特性添加到由 CallbackType 指定的类型中。Attributes can be added only to the type specified by CallbackType.

适用于

AddCustomAttributes(MemberDescriptor, Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

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

参数

descriptor
MemberDescriptor

要添加特性的成员。The member to which the attributes are added.

attributes
Attribute[]

要添加到表中的特性。The attributes that are added to the table.

例外

descriptorattributesnulldescriptor or attributes is null.

注解

如果某个特性与表中已经包含的另一个特性发生冲突,则所添加的最新特性将取代以前的特性。If an attribute conflicts with another attribute already included in the table, the last attribute added replaces previous attributes.

只能将特性添加到由 CallbackType 指定的类型中。Attributes can be added only to the type specified by CallbackType.

适用于

AddCustomAttributes(MemberInfo, Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

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

参数

member
MemberInfo

要添加特性的成员。The member to which the attributes are added.

attributes
Attribute[]

要添加到表中的特性。The attributes that are added to the table.

例外

memberattributesnullmember or attributes is null.

注解

如果某个特性与表中已经包含的另一个特性发生冲突,则所添加的最新特性将取代以前的特性。If an attribute conflicts with another attribute already included in the table, the last attribute added replaces previous attributes.

只能将特性添加到由 CallbackType 指定的类型中。Attributes can be added only to the type specified by CallbackType.

适用于

AddCustomAttributes(String, Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

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

参数

memberName
String

要添加特性的成员的名称。The name of the member to which the attributes are added.

attributes
Attribute[]

要添加到表中的特性。The attributes that are added to the table.

例外

memberNameattributesnullmemberName or attributes is null.

注解

如果某个特性与表中已经包含的另一个特性发生冲突,则所添加的最新特性将取代以前的特性。If an attribute conflicts with another attribute already included in the table, the last attribute added replaces previous attributes.

只能将特性添加到由 CallbackType 指定的类型中。Attributes can be added only to the type specified by CallbackType.

适用于

AddCustomAttributes(DependencyProperty, Attribute[])

将所提供的特性的内容添加到创建此生成器的特性表中。Adds the contents of the provided attributes to the attribute table that created this builder.

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

参数

dp
DependencyProperty

要添加特性的依赖项。The dependency to which the attributes are added.

attributes
Attribute[]

要添加到表中的特性。The attributes that are added to the table.

例外

dpattributesnulldp or attributes is null.

注解

如果某个特性与表中已经包含的另一个特性发生冲突,则所添加的最新特性将取代以前的特性。If an attribute conflicts with another attribute already included in the table, the last attribute added replaces previous attributes.

只能将特性添加到由 CallbackType 指定的类型中。Attributes can be added only to the type specified by CallbackType.

适用于