Bagikan melalui


MetadataBuilder.AddDeclarativeSecurityAttribute Metode

Definisi

Menambahkan atribut keamanan deklaratif ke jenis, metode, atau perakitan.

public:
 System::Reflection::Metadata::DeclarativeSecurityAttributeHandle AddDeclarativeSecurityAttribute(System::Reflection::Metadata::EntityHandle parent, System::Reflection::DeclarativeSecurityAction action, System::Reflection::Metadata::BlobHandle permissionSet);
public System.Reflection.Metadata.DeclarativeSecurityAttributeHandle AddDeclarativeSecurityAttribute (System.Reflection.Metadata.EntityHandle parent, System.Reflection.DeclarativeSecurityAction action, System.Reflection.Metadata.BlobHandle permissionSet);
member this.AddDeclarativeSecurityAttribute : System.Reflection.Metadata.EntityHandle * System.Reflection.DeclarativeSecurityAction * System.Reflection.Metadata.BlobHandle -> System.Reflection.Metadata.DeclarativeSecurityAttributeHandle
Public Function AddDeclarativeSecurityAttribute (parent As EntityHandle, action As DeclarativeSecurityAction, permissionSet As BlobHandle) As DeclarativeSecurityAttributeHandle

Parameter

parent
EntityHandle

Handel entitas induk, yang dapat berupa salah satu hal berikut: , TypeDefinitionHandle, MethodDefinitionHandleatau AssemblyDefinitionHandle.

action
DeclarativeSecurityAction

Tindakan keamanan deklaratif.

permissionSet
BlobHandle

Blob set izin.

Mengembalikan

Handel ke atribut keamanan deklaratif yang ditambahkan.

Pengecualian

parent tidak memiliki jenis handel yang diharapkan.

Keterangan

Entri dapat ditambahkan dalam urutan apa pun. Tabel secara otomatis diurutkan saat diserialisasikan.

Berlaku untuk