PostSharp SDK6.6//Post­Sharp.​Sdk.​Code­Model Namespace/Permission­Set­Declaration Class

PermissionSetDeclaration Class

Represents a permission set (Permission).
Inheritance Hierarchy
System.Object
  PostSharp.Sdk.CodeModel.Element
    PostSharp.Sdk.CodeModel.Declaration
      PostSharp.Sdk.CodeModel.MetadataDeclaration
        PostSharp.Sdk.CodeModel.PermissionSetDeclaration

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.6.3.0 (6.6.3.0)
Syntax
C#
public sealed class PermissionSetDeclaration : MetadataDeclaration, 
	ICloneableModuleElement, IModuleElement

The PermissionSetDeclaration type exposes the following members.

Constructors
  NameDescription
Public methodPermissionSetDeclaration
Initializes a new PermissionSetDeclaration.
Properties
  NameDescription
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyIsOriginal
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.)
Public propertyMetadataToken
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.)
Public propertyOriginalDeclaration
When the declaration represents another declaration in the source assembly, this property refers to this declaration. When using GetReflectionObject(Type[], Type[], BindingOptions), the original declaration should actually be retrieved.
(Inherited from MetadataDeclaration.)
Public propertyParent
Gets the parent declaration.
Public propertyParentMember
Gets the parent member of the current declaration.
(Overrides MetadataDeclaration.ParentMember.)
Public propertyParentType
Gets the parent type of the current declaration.
(Overrides MetadataDeclaration.ParentType.)
Public propertySecurityAction
Gets or sets the SecurityAction of the current permission set.
Public propertyXml
Gets the XML representation.
Methods
  NameDescription
Public methodClearCache
Clear the cache (typically mapping to System.Reflection or, if the current element is a reference, to the related definition) of the current Element and all its children.
(Inherited from Element.)
Public methodClone
Creates a clone of the current module element and express this clone for use in a different module.
Public methodDispose Obsolete. (Inherited from MetadataDeclaration.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetTag<T>
Gets a tag associated with the current declaration.
(Inherited from MetadataDeclaration.)
Public methodGetTokenType
Gets the TokenType of the derived declaration.
(Overrides MetadataDeclaration.GetTokenType().)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetTag<T>
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.)
Public methodToString (Inherited from MetadataDeclaration.)
Remarks

Permissions sets are owned by types implementing ISecurable, i.e. types (TypeDefDeclaration) and methods (MethodDefDeclaration).

A permission set can be represented in the PE image either as a serialized custom attributes (in such case the Attributes property is set), either as XML (in such case the Xml property is set).

See Also