Επεξεργασία

Κοινή χρήση μέσω


AttributeTableBuilder.AddCustomAttributes Method

Definition

Adds the contents of the provided attributes to this builder.

Overloads

AddCustomAttributes(Type, Attribute[])

Adds the contents of the provided attributes to this builder.

AddCustomAttributes(Type, MemberDescriptor, Attribute[])

Adds the contents of the provided attributes to this builder.

AddCustomAttributes(Type, MemberInfo, Attribute[])

Adds the contents of the provided attributes to this builder.

AddCustomAttributes(Type, String, Attribute[])

Adds the contents of the provided attributes to this builder.

AddCustomAttributes(Type, DependencyProperty, Attribute[])

Adds the contents of the provided attributes to this builder.

Remarks

If an attribute conflicts with another attribute already included in the builder, the last attribute added replaces previous attributes.

When building a large attribute table, use AddCallback to defer the work of creating attributes until they are needed.

AddCustomAttributes(Type, Attribute[])

Adds the contents of the provided attributes to this builder.

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())

Parameters

type
Type

The type to add class-level attributes to.

attributes
Attribute[]

The attributes that are added to the builder.

Exceptions

type or attributes is null.

Remarks

If an attribute conflicts with another attribute already included in the builder, the last attribute added replaces previous attributes.

When building a large attribute table, use AddCallback to defer the work of creating attributes until they are needed.

Applies to

AddCustomAttributes(Type, MemberDescriptor, Attribute[])

Adds the contents of the provided attributes to this builder.

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())

Parameters

ownerType
Type

The type that contains the member identified by descriptor.

descriptor
MemberDescriptor

The event or property info that the attributes are added to.

attributes
Attribute[]

The attributes that are added to the builder.

Exceptions

ownerType, descriptor or attributes is null.

Remarks

If an attribute conflicts with another attribute already included in the builder, the last attribute added replaces previous attributes.

When building a large attribute table, use AddCallback to defer the work of creating attributes until they are needed.

Applies to

AddCustomAttributes(Type, MemberInfo, Attribute[])

Adds the contents of the provided attributes to this builder.

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())

Parameters

ownerType
Type

The type that contains the member identified by member.

member
MemberInfo

The event or property info that the attributes are added to.

attributes
Attribute[]

The attributes that are added to the builder.

Exceptions

ownerType, member or attributes is null.

Remarks

If an attribute conflicts with another attribute already included in the builder, the last attribute added replaces previous attributes.

When building a large attribute table, use AddCallback to defer the work of creating attributes until they are needed.

Applies to

AddCustomAttributes(Type, String, Attribute[])

Adds the contents of the provided attributes to this builder.

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())

Parameters

ownerType
Type

The type that contains the member identified by memberName.

memberName
String

The name of the event or property info that the attributes are added to.

attributes
Attribute[]

The attributes that are added to the builder.

Exceptions

ownerType, memberName, or attributes is null.

Remarks

If an attribute conflicts with another attribute already included in the builder, the last attribute added replaces previous attributes.

When building a large attribute table, use AddCallback to defer the work of creating attributes until they are needed.

Applies to

AddCustomAttributes(Type, DependencyProperty, Attribute[])

Adds the contents of the provided attributes to this builder.

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())

Parameters

ownerType
Type

The type that contains the dependency identified by dp.

dp
DependencyProperty

A dependency property to add attributes to.

attributes
Attribute[]

The attributes that are added to the builder.

Exceptions

ownerType, dp or attributes is null.

Remarks

If an attribute conflicts with another attribute already included in the builder, the last attribute added replaces previous attributes.

When building a large attribute table, use AddCallback to defer the work of creating attributes until they are needed.

Applies to