**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Security / System.Security.Cryptography.Xml / EncryptionProperties.cs
blob28cb5fe1410a8e9bea2c3dabd391cc8e76b262e4
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 (tim@timcoleman.com)
7 //
8 // Copyright (C) Tim Coleman, 2004
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 //
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 //
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 #if NET_2_0
33 using System.Collections;
34 using System.Xml;
36 namespace System.Security.Cryptography.Xml {
37 public sealed class EncryptionProperties : IList, ICollection, IEnumerable {
39 #region Fields
41 ArrayList list;
43 #endregion // Fields
45 #region Constructors
47 public EncryptionProperties ()
49 list = new ArrayList ();
52 #endregion // Constructors
54 #region Properties
56 public int Count {
57 get { return list.Count; }
60 public bool IsFixedSize {
61 get { return list.IsFixedSize; }
64 public bool IsReadOnly {
65 get { return list.IsReadOnly; }
68 public bool IsSynchronized {
69 get { return list.IsSynchronized; }
72 object IList.this [int index] {
73 get { return this [index]; }
74 set { this [index] = (EncryptionProperty) value; }
77 public EncryptionProperty this [int index] {
78 get { return (EncryptionProperty) list [index]; }
79 set { list [index] = value; }
82 public object SyncRoot {
83 get { return list.SyncRoot; }
86 #endregion // Properties
88 #region Methods
90 public int Add (EncryptionProperty value)
92 return list.Add (value);
95 public void Clear ()
97 list.Clear ();
100 public bool Contains (EncryptionProperty value)
102 return list.Contains (value);
105 public void CopyTo (Array array, int index)
107 list.CopyTo (array, index);
110 public void CopyTo (EncryptionProperty[] array, int index)
112 list.CopyTo (array, index);
115 public IEnumerator GetEnumerator ()
117 return list.GetEnumerator ();
120 bool IList.Contains (object value)
122 return Contains ((EncryptionProperty) value);
125 int IList.Add (object value)
127 return Add ((EncryptionProperty) value);
130 int IList.IndexOf (object value)
132 return IndexOf ((EncryptionProperty) value);
135 void IList.Insert (int index, object value)
137 Insert (index, (EncryptionProperty) value);
140 void IList.Remove (object value)
142 Remove ((EncryptionProperty) value);
145 public int IndexOf (EncryptionProperty value)
147 return list.IndexOf (value);
150 public void Insert (int index, EncryptionProperty value)
152 list.Insert (index, value);
155 public void Remove (EncryptionProperty value)
157 list.Remove (value);
160 public void RemoveAt (int index)
162 list.RemoveAt (index);
165 #endregion // Methods
169 #endif