AttributeCallbackBuilder.AddCustomAttributes 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將所提供屬性的內容加入建立此建構器的屬性表。
多載
| 名稱 | Description |
|---|---|
| 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所指定的類型。