Individual permissions are always part of some named permission set. Conversely a named permission set is formed from a set of permissions.
Schema for named Permission sets:
<PermissionSet class=”System.Security.NamedPermissionSet> ( <Permission class=”…”…> [permission xml as seen in 5.1.] </Permission> )* <Name>[Name of permission set]</Name> <Description>[description of the permission set]</Description> </PermissionSet>
Explanation: As indicated in the schema definition above a Permission set can include an arbitrary (non-zero) number of permissions. The only restriction is that the same permission type (viz. FileIOPermission) may not appear twice in the same permission set. Following the permissions are the name and the description of the permission set.
Example:
<PermissionSet class=”System.Security.NamedPermissionSet> <Permission class=”System.Security.Permissions.SecurityPermission”> <SafeTopLevelWindows/> <AllClipboard/> <VersionTag>XMLNotationV1</VersionTag> </Permission> <Permission class=”System.Security.Permissions.FileIOPermission”> <Unrestricted/> <VersionTag>XMLNotationV1</VersionTag> </Permission> <Permission class=”System.Security.Permissions.SecurityPermission”> <Execution/> <VersionTag>XMLNotationV1</VersionTag> </Permission> <Name>MyPermissionSet</Name> <Description>Allows clipboard and some Windows UI as well as full file IO and execurion of code</Description> </PermissionSet>