New tests.
[mono.git] / mcs / class / corlib / System.Security.Policy / HashMembershipCondition.cs
index cccdcda0c044c2f1a71bbfb2bf2905f1497a8306..6918f250f85c6ba3b6e522512d6eface402663fa 100644 (file)
@@ -1,5 +1,5 @@
 //
-// System.Security.Policy.HashMembershipCondition
+// System.Security.Policy.HashMembershipCondition.cs
 //
 // Authors:
 //     Jackson Harper (Jackson@LatitudeGeo.com)
@@ -28,6 +28,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !MOONLIGHT
+
 using System.Collections;
 using System.Globalization;
 using System.Reflection;
@@ -40,12 +42,8 @@ using Mono.Security.Cryptography;
 namespace System.Security.Policy {
 
        [Serializable]
-#if NET_2_0
        [ComVisible (true)]
        public sealed class HashMembershipCondition : IMembershipCondition, IDeserializationCallback, ISerializable {
-#else
-       public sealed class HashMembershipCondition : IMembershipCondition {
-#endif
                private readonly int version = 1;
 
                private HashAlgorithm hash_algorithm;
@@ -56,15 +54,15 @@ namespace System.Security.Policy {
                {
                }
 
-               public HashMembershipCondition (HashAlgorithm hash_algorithm, byte[] hash_value)
+               public HashMembershipCondition (HashAlgorithm hashAlg, byte[] value)
                {
-                       if (hash_algorithm == null)
-                               throw new ArgumentNullException ("hash_algorithm");
-                       if (hash_value == null)
-                               throw new ArgumentNullException ("hash_value");
+                       if (hashAlg == null)
+                               throw new ArgumentNullException ("hashAlg");
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
                                
-                       this.hash_algorithm = hash_algorithm;
-                       this.hash_value = (byte[]) hash_value.Clone ();
+                       this.hash_algorithm = hashAlg;
+                       this.hash_value = (byte[]) value.Clone ();
                }
 
                //
@@ -146,9 +144,9 @@ namespace System.Security.Policy {
                        return se;
                }
 
-               public void FromXml (SecurityElement element)
+               public void FromXml (SecurityElement e)
                {
-                       FromXml (element, null);
+                       FromXml (e, null);
                }
                
                public void FromXml (SecurityElement e, PolicyLevel level)
@@ -197,7 +195,6 @@ namespace System.Security.Policy {
                        return true;
                }
 
-#if NET_2_0
                [MonoTODO ("fx 2.0")]
                void IDeserializationCallback.OnDeserialization (object sender)
                {
@@ -207,7 +204,8 @@ namespace System.Security.Policy {
                void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context) 
                {
                }
-#endif
        }
 }
 
+#endif
+