// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if SECURITY_DEP
using System.Collections;
private ArrayList _list;
public CryptographicAttributeObjectCollection ()
- {\r
+ {
_list = new ArrayList ();
}
public CryptographicAttributeObjectCollection (CryptographicAttributeObject attribute)
: this ()
- {\r
+ {
_list.Add (attribute);
}
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);
}
}
}
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);
}
}