AttributeCallbackBuilder.AddCustomAttributes 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将所提供的属性的内容添加到创建此生成器的属性表中。
重载
| 名称 | 说明 |
|---|---|
| AddCustomAttributes(Attribute[]) |
将所提供的属性的内容添加到创建此生成器的属性表中。 |
| AddCustomAttributes(MemberDescriptor, Attribute[]) |
将所提供的属性的内容添加到创建此生成器的属性表中。 |
| AddCustomAttributes(MemberInfo, Attribute[]) |
将所提供的属性的内容添加到创建此生成器的属性表中。 |
| AddCustomAttributes(String, Attribute[]) |
将所提供的属性的内容添加到创建此生成器的属性表中。 |
| AddCustomAttributes(DependencyProperty, Attribute[]) |
将所提供的属性的内容添加到创建此生成器的属性表中。 |
注解
如果属性与表中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。
只能将属性添加到指定的 CallbackType类型。
AddCustomAttributes(Attribute[])
将所提供的属性的内容添加到创建此生成器的属性表中。
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[]
添加到表的属性。
例外
attributes 是 null。
注解
如果属性与表中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。
只能将属性添加到指定的 CallbackType类型。
适用于
AddCustomAttributes(MemberDescriptor, Attribute[])
将所提供的属性的内容添加到创建此生成器的属性表中。
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
将属性添加到的成员。
- attributes
- Attribute[]
添加到表的属性。
例外
descriptor 或 attributes 为 null.
注解
如果属性与表中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。
只能将属性添加到指定的 CallbackType类型。
适用于
AddCustomAttributes(MemberInfo, Attribute[])
将所提供的属性的内容添加到创建此生成器的属性表中。
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
将属性添加到的成员。
- attributes
- Attribute[]
添加到表的属性。
例外
member 或 attributes 为 null.
注解
如果属性与表中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。
只能将属性添加到指定的 CallbackType类型。
适用于
AddCustomAttributes(String, Attribute[])
将所提供的属性的内容添加到创建此生成器的属性表中。
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
向其添加属性的成员的名称。
- attributes
- Attribute[]
添加到表的属性。
例外
memberName 或 attributes 为 null.
注解
如果属性与表中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。
只能将属性添加到指定的 CallbackType类型。
适用于
AddCustomAttributes(DependencyProperty, Attribute[])
将所提供的属性的内容添加到创建此生成器的属性表中。
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())
参数
将属性添加到的依赖项。
- attributes
- Attribute[]
添加到表的属性。
例外
dp 或 attributes 为 null.
注解
如果属性与表中已包含的另一个属性冲突,则添加的最后一个属性将替换以前的属性。
只能将属性添加到指定的 CallbackType类型。