blob: a642255f3359b84953b45419679db90af5d38a3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// cs0647-5.cs: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent'
// Line : 11
using System;
using System.Security;
using System.Security.Permissions;
public class Program {
public delegate int DisplayHandler (string msg);
[DebugPermission (SecurityAction.RequestMinimum)]
public event DisplayHandler OnShow;
}
[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
[Serializable]
public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
public DebugPermissionAttribute (SecurityAction action)
: base (action)
{
}
public override IPermission CreatePermission ()
{
return null;
}
}
|