[This is preliminary documentation and is subject to change.]
Type must be something that inherits from System.Security.Permissions.CodeAccessSecurityAttribute.
Assembly: Forcepoint.GUISS (in Forcepoint.GUISS.dll) Version: 0.2.0.1 (0.2.0.1)
Syntax
C# |
---|
public Dictionary<Type, SecurityCheckDelegate> SecurityChecks { get; set; } |
Remarks
Examples of PermissionAttributes are:
For a full list of PermissionAttributes, see http://msdn.microsoft.com/en-us/library/system.security.permissions.codeaccesssecurityattribute.aspxIn Skin libraries, the Security should be set this way:
- Under the Properties node in the Solution Explorer, open up AssemblyInfo.cs
- At the bottom of the file, add something like this: [assembly: FileIOPermissionAttribute(SecurityAction.RequestRefuse, Unrestricted=true)]
Examples
CopyC#
private SetUpSecurity { Skin.SecurityChecks.Add(typeof(FileIOPermissionAttribute), new SecurityCheckDelegate(SecurityCheck_FileIOPermission)); } private bool SecurityCheck_FileIOPermission(object permissionAttribute) { FileIOPermissionAttribute fiopa = (FileIOPermissionAttribute)permissionAttribute; //This means: Request refusal for having Unrestricted access. if (fiopa.Action == SecurityAction.RequestRefuse && fiopa.Unrestricted == true) return true; else return false; }