Merge pull request #2780 from alexanderkyte/seq_point_optimize
[mono.git] / mcs / class / System.Security / System.Security.Cryptography / CryptographicAttributeCollection.cs
index d3a08efa6d8816129365635ae837c19198279f4b..891de02123958113b421a7cfa5854c178da619a4 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
+#if SECURITY_DEP
 
 using System.Collections;
 
@@ -38,13 +38,13 @@ namespace System.Security.Cryptography {
                private ArrayList _list;
 
                public CryptographicAttributeObjectCollection () 
-               {\r
+               {
                        _list = new ArrayList ();
                }
 
                public CryptographicAttributeObjectCollection (CryptographicAttributeObject attribute)
                        : this ()
-               {\r
+               {
                        _list.Add (attribute);
                }
 
@@ -71,33 +71,33 @@ namespace System.Security.Cryptography {
                public int Add (AsnEncodedData asnEncodedData)
                {
                        if (asnEncodedData == null)
-                               throw new ArgumentNullException ("asnEncodedData");\r
-\r
-                       AsnEncodedDataCollection coll = new AsnEncodedDataCollection (asnEncodedData);\r
+                               throw new ArgumentNullException ("asnEncodedData");
+
+                       AsnEncodedDataCollection coll = new AsnEncodedDataCollection (asnEncodedData);
                        return Add (new CryptographicAttributeObject (asnEncodedData.Oid, coll));
                }
 
                public int Add (CryptographicAttributeObject attribute)
                {
                        if (attribute == null)
-                               throw new ArgumentNullException ("attribute");\r
-\r
-                       int existing = -1;\r
-                       string oid = attribute.Oid.Value;\r
-                       for (int i=0; i < _list.Count; i++) {\r
-                               if ((_list[i] as CryptographicAttributeObject).Oid.Value == oid) {\r
-                                       existing = i;\r
-                                       break;\r
-                               }\r
-                       }\r
-                       if (existing >= 0) {\r
-                               CryptographicAttributeObject cao = this[existing];\r
-                               foreach (AsnEncodedData value in attribute.Values) {\r
-                                       cao.Values.Add (value);\r
-                               }\r
-                               return existing;\r
-                       } else {\r
-                               return _list.Add (attribute);\r
+                               throw new ArgumentNullException ("attribute");
+
+                       int existing = -1;
+                       string oid = attribute.Oid.Value;
+                       for (int i=0; i < _list.Count; i++) {
+                               if ((_list[i] as CryptographicAttributeObject).Oid.Value == oid) {
+                                       existing = i;
+                                       break;
+                               }
+                       }
+                       if (existing >= 0) {
+                               CryptographicAttributeObject cao = this[existing];
+                               foreach (AsnEncodedData value in attribute.Values) {
+                                       cao.Values.Add (value);
+                               }
+                               return existing;
+                       } else {
+                               return _list.Add (attribute);
                        }
                }
 
@@ -122,10 +122,10 @@ namespace System.Security.Cryptography {
                }
 
                public void Remove (CryptographicAttributeObject attribute) 
-               {\r
-                       if (attribute == null)\r
-                               throw new ArgumentNullException ("attribute");\r
-\r
+               {
+                       if (attribute == null)
+                               throw new ArgumentNullException ("attribute");
+
                        _list.Remove (attribute);
                }
        }