diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2010-07-26 00:19:54 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2010-07-26 00:50:13 +0400 |
commit | cd51491631380ed56723fdfc66945213f9864b5a (patch) | |
tree | 05ebbd8cd16e55aae7d81003a3ba0c803eab8e1f /mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs | |
parent | 5c94b81517e934060ca88474eaefb2b516be734a (diff) |
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.
Diffstat (limited to 'mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs')
-rw-r--r-- | mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs | 54 |
1 files changed, 27 insertions, 27 deletions
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); } } |