MetadataBuilder.AddDeclarativeSecurityAttribute Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a declarative security attribute to a type, method, or assembly.
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
Parameters
- parent
- EntityHandle
The parent entity handle, which can be one of the following: a TypeDefinitionHandle, MethodDefinitionHandle, or a AssemblyDefinitionHandle.
- action
- DeclarativeSecurityAction
A declarative security action.
- permissionSet
- BlobHandle
The permission set blob.
Returns
A handle to the added declarative security attribute.
Exceptions
parent
doesn't have the expected handle kind.
Remarks
Entries may be added in any order. The table is automatically sorted when serialized.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om