Click or drag to resize
Sandcastle XML Comments Guide

permission

This element is used to define the permissions required to access a type or member.

Syntax

This top-level element is valid on all types and type members.

<permission cref="permissionTypeOrMember">description</permission>

The cref attribute is used to specify a permission type required to access the type or member. It is typically one of the .NET permission set types such as PermissionSet or SecurityPermission. Use the inner text to describe how the permission applies to the type or member.

Examples
/// <summary>
/// The <c>permission</c> element is used to document the types of permissions that
/// a caller must be granted to access this method.
/// </summary>
/// <permission cref="SecurityPermission">
/// <see cref="SecurityPermissionFlag.Execution">Execution</see> privilege.
/// </permission>
/// <permission cref="ReflectionPermission">
/// <see cref="ReflectionPermissionFlag.MemberAccess">Member access</see> privilege
/// for reflection.</permission>
/// <conceptualLink target="4af64f3f-a9a3-42d7-a95c-bc0a40951286" />
[SecurityPermission(SecurityAction.Demand, Execution = true)]
[ReflectionPermission(SecurityAction.Demand, MemberAccess = true)]
public void MethodRequiringSpecificPermissions()
{
}
See Also