CryptographicAttribute.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // CryptographicAttribute.cs - System.Security.Cryptography.Pkcs.CryptographicAttribute
  3. //
  4. // Author:
  5. // Sebastien Pouliot ([email protected])
  6. //
  7. // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
  8. //
  9. #if NET_1_2
  10. using System;
  11. using System.Collections;
  12. namespace System.Security.Cryptography.Pkcs {
  13. public class CryptographicAttribute {
  14. private Oid _oid;
  15. private ArrayList _list;
  16. // constructors
  17. public CryptographicAttribute (Oid oid)
  18. {
  19. // FIXME: compatibility with fx 1.2.3400.0
  20. // if (oid == null)
  21. // throw new ArgumentNullException ("oid");
  22. _oid = oid;
  23. _list = new ArrayList ();
  24. }
  25. public CryptographicAttribute (Oid oid, ArrayList values) : this (oid)
  26. {
  27. // FIXME: compatibility with fx 1.2.3400.0
  28. if (values == null)
  29. throw new NullReferenceException ();
  30. // throw new ArgumentNullException ("values");
  31. _list.AddRange (values);
  32. }
  33. public CryptographicAttribute (Oid oid, object value) : this (oid)
  34. {
  35. // FIXME: compatibility with fx 1.2.3400.0
  36. // if (value == null)
  37. // throw new ArgumentNullException ("value");
  38. _list.Add (value);
  39. }
  40. // properties
  41. public Oid Oid {
  42. get { return _oid; }
  43. }
  44. public ArrayList Values {
  45. get { return _list; }
  46. }
  47. }
  48. }
  49. #endif