9df8842f1eaf0151b66c6d784026d9ae8df6a425
[mono.git] / mcs / class / corlib / System.Security.Permissions / StrongNameIdentityPermission.cs
1 //
2 // StrongNameIdentityPermission.cs: Strong Name Identity Permission
3 //
4 // Author:
5 //      Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2002 Motus Technologies Inc. (http://www.motus.com)
8 //
9
10 using System;
11
12 namespace System.Security.Permissions {
13
14 public sealed class StrongNameIdentityPermission : CodeAccessPermission {
15
16         private StrongNamePublicKeyBlob publickey;
17         private string name;
18         private Version version;
19
20         public StrongNameIdentityPermission (PermissionState state) 
21         {
22                 if (state == PermissionState.Unrestricted)
23                         throw new ArgumentException ("state");
24         }
25
26         public StrongNameIdentityPermission (StrongNamePublicKeyBlob blob, string name, Version version) 
27         {
28                 if (blob == null)
29                         throw new ArgumentNullException ("blob");
30                 if (name == null)
31                         throw new ArgumentNullException ("name");
32                 if (version == null)
33                         throw new ArgumentNullException ("version");
34
35                 publickey = blob;
36                 this.name = name;
37                 this.version = version;
38         }
39
40         ~StrongNameIdentityPermission () 
41         {
42         }
43
44         public string Name { 
45                 get { return name; }
46                 set { name = value; }
47         }
48
49         public StrongNamePublicKeyBlob PublicKey { 
50                 get { return publickey; }
51                 set {
52                         if (value == null)
53                                 throw new ArgumentNullException ("value");
54                         publickey = value;
55                 }
56         }
57
58         public Version Version { 
59                 get { return version; }
60                 set { version = value; }
61         }
62
63         public override IPermission Copy () 
64         {
65                 return new StrongNameIdentityPermission (publickey, name, version);
66         }
67
68         [MonoTODO]
69         public override void FromXml (SecurityElement e) 
70         {
71                 if (e == null)
72                         throw new ArgumentNullException ("e");
73                 throw new NotImplementedException ();
74         }
75
76         [MonoTODO]
77         public override IPermission Intersect (IPermission target) 
78         {
79                 throw new NotImplementedException ();
80         }
81
82         [MonoTODO]
83         public override bool IsSubsetOf (IPermission target) 
84         {
85                 throw new NotImplementedException ();
86         }
87
88         [MonoTODO]
89         public override SecurityElement ToXml () 
90         {
91                 throw new NotImplementedException ();
92         }
93
94         [MonoTODO]
95         public override IPermission Union (IPermission target) 
96         {
97                 throw new NotImplementedException ();
98         }
99
100
101 }