MetadataBuilder.AddCustomAttribute Methode

Definition

Fügt ein benutzerdefiniertes Attribut hinzu.

public:
 System::Reflection::Metadata::CustomAttributeHandle AddCustomAttribute(System::Reflection::Metadata::EntityHandle parent, System::Reflection::Metadata::EntityHandle constructor, System::Reflection::Metadata::BlobHandle value);
public System.Reflection.Metadata.CustomAttributeHandle AddCustomAttribute (System.Reflection.Metadata.EntityHandle parent, System.Reflection.Metadata.EntityHandle constructor, System.Reflection.Metadata.BlobHandle value);
member this.AddCustomAttribute : System.Reflection.Metadata.EntityHandle * System.Reflection.Metadata.EntityHandle * System.Reflection.Metadata.BlobHandle -> System.Reflection.Metadata.CustomAttributeHandle
Public Function AddCustomAttribute (parent As EntityHandle, constructor As EntityHandle, value As BlobHandle) As CustomAttributeHandle

Parameter

constructor
EntityHandle

Ein benutzerdefinierter Attributkonstruktor: MethodDefinitionHandle oder MemberReferenceHandle.

value
BlobHandle

Ein benutzerdefiniertes Attributwertblob.

Gibt zurück

Ein Handle für das hinzugefügte benutzerdefinierte Attribut.

Ausnahmen

parent weist nicht das erwartete Handle auf.

Hinweise

Einträge können in beliebiger Reihenfolge hinzugefügt werden. Die Tabelle wird beim Serialisieren automatisch sortiert.

Gilt für: