From cd51491631380ed56723fdfc66945213f9864b5a Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Mon, 26 Jul 2010 01:49:54 +0530 Subject: Fix a few cases of mixed line-endings This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only based on which patch is smaller. I used a threshold of upto a quarter of the lines to determine whether to keep the patch or not. --- .../System.Security.Cryptography/.gitattributes | 1 - .../CryptographicAttributeCollection.cs | 54 +++++++++++----------- 2 files changed, 27 insertions(+), 28 deletions(-) (limited to 'mcs/class/System.Security') diff --git a/mcs/class/System.Security/System.Security.Cryptography/.gitattributes b/mcs/class/System.Security/System.Security.Cryptography/.gitattributes index 1ea63cf2646..db436e72e33 100644 --- a/mcs/class/System.Security/System.Security.Cryptography/.gitattributes +++ b/mcs/class/System.Security/System.Security.Cryptography/.gitattributes @@ -1,3 +1,2 @@ -/CryptographicAttributeCollection.cs -crlf /ProtectedData.cs -crlf /ProtectedMemory.cs -crlf diff --git a/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs b/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs index 60d3851a77a..6261ff4b09a 100644 --- a/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs +++ b/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs @@ -38,13 +38,13 @@ namespace System.Security.Cryptography { private ArrayList _list; public CryptographicAttributeObjectCollection () - { + { _list = new ArrayList (); } public CryptographicAttributeObjectCollection (CryptographicAttributeObject attribute) : this () - { + { _list.Add (attribute); } @@ -71,33 +71,33 @@ namespace System.Security.Cryptography { public int Add (AsnEncodedData asnEncodedData) { if (asnEncodedData == null) - throw new ArgumentNullException ("asnEncodedData"); - - AsnEncodedDataCollection coll = new AsnEncodedDataCollection (asnEncodedData); + 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"); - - 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); + 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) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - + { + if (attribute == null) + throw new ArgumentNullException ("attribute"); + _list.Remove (attribute); } } -- cgit v1.2.3