diff options
author | Sebastien Pouliot <sebastien@ximian.com> | 2004-10-20 01:22:04 +0400 |
---|---|---|
committer | Sebastien Pouliot <sebastien@ximian.com> | 2004-10-20 01:22:04 +0400 |
commit | 69bdae744aab244bfcba56acc3e1f32f98679eb3 (patch) | |
tree | e843024fe5b193cc32b2f706d1d455788b97d621 /mcs/class/corlib/System.Security/SecurityManager.cs | |
parent | 832dc9e46c30b3f8849f34f6312e1698c2fc0d96 (diff) |
2004-10-19 Sebastien Pouliot <sebastien@ximian.com>
* SecurityManager.cs: Changed private static methods to use a single
parameter (as method permissions overrides class permissions for
demand, assert, deny and permitonly).
svn path=/trunk/mcs/; revision=35143
Diffstat (limited to 'mcs/class/corlib/System.Security/SecurityManager.cs')
-rw-r--r-- | mcs/class/corlib/System.Security/SecurityManager.cs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mcs/class/corlib/System.Security/SecurityManager.cs b/mcs/class/corlib/System.Security/SecurityManager.cs index 16effe51e34..9046ef13140 100644 --- a/mcs/class/corlib/System.Security/SecurityManager.cs +++ b/mcs/class/corlib/System.Security/SecurityManager.cs @@ -397,38 +397,39 @@ namespace System.Security { } } - private static void InternalDemand (byte[] classPermissions, byte[] methodPermissions) + private static void InternalDemand (byte[] permissions) { - PermissionSet ps = Union (classPermissions, methodPermissions); + PermissionSet ps = Decode (permissions); ps.Demand (); } - private static void InternalDemandChoice (byte[] classPermissions, byte[] methodPermissions) + private static void InternalDemandChoice (byte[] permissions) { #if NET_2_0 - PermissionSet ps = Union (classPermissions, methodPermissions); + PermissionSet ps = Decode (permissions); + // TODO #else throw new SecurityException ("SecurityAction.DemandChoice is only possible in 2.0"); #endif } - private static void InternalAssert (byte[] classPermissions, byte[] methodPermissions) + private static void InternalAssert (byte[] permissions) { - PermissionSet ps = Union (classPermissions, methodPermissions); + PermissionSet ps = Decode (permissions); // note: Calling PermissionSet.Assert would have produced an unrequired copy of the PermissionSet CodeAccessPermission.SetCurrentFrame (CodeAccessPermission.StackModifier.Assert, ps); } - private static void InternalDeny (byte[] classPermissions, byte[] methodPermissions) + private static void InternalDeny (byte[] permissions) { - PermissionSet ps = Union (classPermissions, methodPermissions); + PermissionSet ps = Decode (permissions); // note: Calling PermissionSet.Deny would have produced an unrequired copy of the PermissionSet CodeAccessPermission.SetCurrentFrame (CodeAccessPermission.StackModifier.Deny, ps); } - private static void InternalPermitOnly (byte[] classPermissions, byte[] methodPermissions) + private static void InternalPermitOnly (byte[] permissions) { - PermissionSet ps = Union (classPermissions, methodPermissions); + PermissionSet ps = Decode (permissions); // note: Calling PermissionSet.PermitOnly would have produced an unrequired copy of the PermissionSet CodeAccessPermission.SetCurrentFrame (CodeAccessPermission.StackModifier.PermitOnly, ps); } |