New tests.
[mono.git] / mcs / class / corlib / System.Security.Policy / PolicyStatement.cs
index 0c48ba866e1f69994a06fc75e22c519cad27ed34..111c25e34a13a9eacc2e0ee4594ec260a0191bd2 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-// System.Security.Policy.PolicyStatement\r
+// System.Security.Policy.PolicyStatement.cs\r
 //\r
 // Authors:\r
 //     Dan Lewis (dihlewis@yahoo.co.uk)\r
@@ -34,26 +34,24 @@ using System.Security.Permissions;
 namespace System.Security.Policy {\r
 \r
        [Serializable]\r
-#if NET_2_0
        [ComVisible (true)]
-#endif
        public sealed class PolicyStatement : ISecurityEncodable, ISecurityPolicyEncodable {
 
                private PermissionSet perms;\r
                private PolicyStatementAttribute attrs;\r
 \r
-               public PolicyStatement (PermissionSet perms) :
-                       this (perms, PolicyStatementAttribute.Nothing)\r
+               public PolicyStatement (PermissionSet permSet) :
+                       this (permSet, PolicyStatementAttribute.Nothing)\r
                {
                }\r
 \r
-               public PolicyStatement (PermissionSet perms, PolicyStatementAttribute attrs) 
+               public PolicyStatement (PermissionSet permSet, PolicyStatementAttribute attributes) 
                {\r
-                       if (perms != null) {\r
-                               this.perms = perms.Copy ();
+                       if (permSet != null) {\r
+                               this.perms = permSet.Copy ();
                                this.perms.SetReadOnly (true);
                        }\r
-                       this.attrs = attrs;\r
+                       this.attrs = attributes;\r
                }\r
                \r
                public PermissionSet PermissionSet {\r
@@ -107,26 +105,26 @@ namespace System.Security.Policy {
 \r
                // ISecurityEncodable\r
 \r
-               public void FromXml (SecurityElement e)\r
+               public void FromXml (SecurityElement et)\r
                {\r
-                       FromXml (e, null);\r
+                       FromXml (et, null);\r
                }\r
 \r
-               public void FromXml (SecurityElement e, PolicyLevel level)\r
+               public void FromXml (SecurityElement et, PolicyLevel level)\r
                {
-                       if (e == null)
-                               throw new ArgumentNullException ("e");
-                       if (e.Tag != "PolicyStatement")
+                       if (et == null)
+                               throw new ArgumentNullException ("et");
+                       if (et.Tag != "PolicyStatement")
                                throw new ArgumentException (Locale.GetText ("Invalid tag."));
 \r
 \r
-                       string attributes = e.Attribute ("Attributes");\r
+                       string attributes = et.Attribute ("Attributes");\r
                        if (attributes != null) {\r
                                attrs = (PolicyStatementAttribute) Enum.Parse (\r
                                        typeof (PolicyStatementAttribute), attributes);\r
                        }
 \r
-                       SecurityElement permissions = e.SearchForChildByTag ("PermissionSet");\r
+                       SecurityElement permissions = et.SearchForChildByTag ("PermissionSet");\r
                        PermissionSet.FromXml (permissions);\r
                }\r
                \r
@@ -148,7 +146,6 @@ namespace System.Security.Policy {
                        return element;\r
                }
 
-#if NET_2_0
                [ComVisible (false)]
                public override bool Equals (object obj)
                {
@@ -167,7 +164,6 @@ namespace System.Security.Policy {
                        // return same hash code if two PolicyStatement are equals
                        return (PermissionSet.GetHashCode () ^ (int) attrs);
                }
-#endif
 
                internal static PolicyStatement Empty ()
                {