EncryptionProperties.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. //
  2. // EncryptionProperties.cs - EncryptionProperties implementation for XML Encryption
  3. // http://www.w3.org/2001/04/xmlenc#sec-EncryptionProperties
  4. //
  5. // Author:
  6. // Tim Coleman ([email protected])
  7. //
  8. // Copyright (C) Tim Coleman, 2004
  9. #if NET_1_2
  10. using System.Collections;
  11. using System.Xml;
  12. namespace System.Security.Cryptography.Xml {
  13. public sealed class EncryptionProperties : IList, ICollection, IEnumerable {
  14. #region Fields
  15. ArrayList list;
  16. #endregion // Fields
  17. #region Constructors
  18. public EncryptionProperties ()
  19. {
  20. list = new ArrayList ();
  21. }
  22. #endregion // Constructors
  23. #region Properties
  24. public int Count {
  25. get { return list.Count; }
  26. }
  27. public bool IsFixedSize {
  28. get { return list.IsFixedSize; }
  29. }
  30. public bool IsReadOnly {
  31. get { return list.IsReadOnly; }
  32. }
  33. public bool IsSynchronized {
  34. get { return list.IsSynchronized; }
  35. }
  36. object IList.this [int index] {
  37. get { return this [index]; }
  38. set { this [index] = (EncryptionProperty) value; }
  39. }
  40. public EncryptionProperty this [int index] {
  41. get { return (EncryptionProperty) list [index]; }
  42. set { list [index] = value; }
  43. }
  44. public object SyncRoot {
  45. get { return list.SyncRoot; }
  46. }
  47. #endregion // Properties
  48. #region Methods
  49. public int Add (EncryptionProperty value)
  50. {
  51. return list.Add (value);
  52. }
  53. public void Clear ()
  54. {
  55. list.Clear ();
  56. }
  57. public bool Contains (EncryptionProperty value)
  58. {
  59. return list.Contains (value);
  60. }
  61. public void CopyTo (Array array, int index)
  62. {
  63. list.CopyTo (array, index);
  64. }
  65. public void CopyTo (EncryptionProperty[] array, int index)
  66. {
  67. list.CopyTo (array, index);
  68. }
  69. public IEnumerator GetEnumerator ()
  70. {
  71. return list.GetEnumerator ();
  72. }
  73. bool IList.Contains (object value)
  74. {
  75. return Contains ((EncryptionProperty) value);
  76. }
  77. int IList.Add (object value)
  78. {
  79. return Add ((EncryptionProperty) value);
  80. }
  81. int IList.IndexOf (object value)
  82. {
  83. return IndexOf ((EncryptionProperty) value);
  84. }
  85. void IList.Insert (int index, object value)
  86. {
  87. Insert (index, (EncryptionProperty) value);
  88. }
  89. void IList.Remove (object value)
  90. {
  91. Remove ((EncryptionProperty) value);
  92. }
  93. public int IndexOf (EncryptionProperty value)
  94. {
  95. return list.IndexOf (value);
  96. }
  97. public void Insert (int index, EncryptionProperty value)
  98. {
  99. list.Insert (index, value);
  100. }
  101. public void Remove (EncryptionProperty value)
  102. {
  103. list.Remove (value);
  104. }
  105. public void RemoveAt (int index)
  106. {
  107. list.RemoveAt (index);
  108. }
  109. #endregion // Methods
  110. }
  111. }
  112. #endif