2003-11-12 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
[mono.git] / mcs / class / System / System.Web / AspNetHostingPermission.cs
1 //
2 // System.Web.AspNetHostingPermission.cs
3 //
4 // Author:
5 //   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
6 //
7
8 #if NET_1_1
9
10 using System.Security;
11 using System.Security.Permissions;
12
13 namespace System.Web
14 {
15         public sealed class AspNetHostingPermission : CodeAccessPermission, IUnrestrictedPermission
16         {
17                 AspNetHostingPermissionLevel level;
18
19                 public AspNetHostingPermission (AspNetHostingPermissionLevel level)
20                 {
21                         this.level = level;
22                 }
23                 public AspNetHostingPermission (PermissionState state)
24                 {
25                         switch (state) {
26                                 case PermissionState.None:
27                                         level = AspNetHostingPermissionLevel.None;
28                                         break;
29                                 case PermissionState.Unrestricted:
30                                         level = AspNetHostingPermissionLevel.Unrestricted;
31                                         break;
32                         }
33                 }
34
35                 public AspNetHostingPermissionLevel Level {
36                         get { return level; }
37                         set { level = value; }
38                 }
39
40                 public bool IsUnrestricted ()
41                 {
42                         return (level == AspNetHostingPermissionLevel.Unrestricted);
43                 }
44
45                 public override IPermission Copy ()
46                 {
47                         return new AspNetHostingPermission (level);
48                 }
49
50                 [MonoTODO ("implement")]
51                 public override void FromXml (SecurityElement securityElement)
52                 {
53                         throw new NotImplementedException ();
54                 }
55
56                 [MonoTODO ("implement")]
57                 public override SecurityElement ToXml ()
58                 {
59                         throw new NotImplementedException ();
60                 }
61
62                 [MonoTODO ("implement")]
63                 public override IPermission Intersect (IPermission target)
64                 {
65                         throw new NotImplementedException ();
66                 }
67
68                 [MonoTODO ("implement")]
69                 public override bool IsSubsetOf (IPermission target)
70                 {
71                         throw new NotImplementedException ();
72                 }
73
74                 [MonoTODO ("implement")]
75                 public override IPermission Union (IPermission target)
76                 {
77                         throw new NotImplementedException ();
78                 }
79         }
80 }
81
82 #endif