ReflectionPermission

Table A-8 shows the required ReflectionPermission settings for PowerScript reflection functions and objects in .NET targets.

Table A-8: ReflectionPermission required in .NET targets

System function or object

Permission required

FindClassDefinition, FindTypeDefinition

TypeInformation

ScriptDefinition object

TypeInformation

Example 1

The following permission setting in Windows Forms targets allows reflection for members of a type that are not visible:

<IPermission class=   "System.Security.Permissions.ReflectionPermission,   mscorlib, Version=2.0.0.0, Culture=neutral,   PublicKeyToken=b77a5c561934e089" version="1"   Flags="TypeInformation" />

Example 2

The following permission setting in Web Forms targets allows reflection for members of a type that are not visible:

<IPermission class="ReflectionPermission" version="1"   Flags="TypeInformation"/>