2004-03-16 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mcs / class / System.Security / System.Security.Cryptography.Xml / EncryptionProperties.cs
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
9
10 #if NET_1_2
11
12 using System.Collections;
13 using System.Xml;
14
15 namespace System.Security.Cryptography.Xml {
16         public sealed class EncryptionProperties : IList, ICollection, IEnumerable {
17
18                 #region Fields
19                 
20                 ArrayList list;
21
22                 #endregion // Fields
23         
24                 #region Constructors
25
26                 public EncryptionProperties ()
27                 {
28                         list = new ArrayList ();
29                 }
30         
31                 #endregion // Constructors
32         
33                 #region Properties
34
35                 public int Count {
36                         get { return list.Count; }
37                 }
38
39                 public bool IsFixedSize {
40                         get { return list.IsFixedSize; }
41                 }
42
43                 public bool IsReadOnly {
44                         get { return list.IsReadOnly; }
45                 }
46
47                 public bool IsSynchronized {
48                         get { return list.IsSynchronized; }
49                 }
50
51                 object IList.this [int index] {
52                         get { return this [index]; }
53                         set { this [index] = (EncryptionProperty) value; }
54                 }
55
56                 public EncryptionProperty this [int index] {
57                         get { return (EncryptionProperty) list [index]; }
58                         set { list [index] = value; }
59                 }
60
61                 public object SyncRoot {
62                         get { return list.SyncRoot; }
63                 }
64
65                 #endregion // Properties
66
67                 #region Methods
68
69                 public int Add (EncryptionProperty value)
70                 {
71                         return list.Add (value);
72                 }
73
74                 public void Clear ()
75                 {
76                         list.Clear ();
77                 }
78
79                 public bool Contains (EncryptionProperty value)
80                 {
81                         return list.Contains (value);
82                 }
83
84                 public void CopyTo (Array array, int index)
85                 {
86                         list.CopyTo (array, index);
87                 }
88
89                 public void CopyTo (EncryptionProperty[] array, int index)
90                 {
91                         list.CopyTo (array, index);
92                 }
93
94                 public IEnumerator GetEnumerator ()
95                 {
96                         return list.GetEnumerator ();
97                 }
98
99                 bool IList.Contains (object value)
100                 {
101                         return Contains ((EncryptionProperty) value);
102                 }
103
104                 int IList.Add (object value)
105                 {
106                         return Add ((EncryptionProperty) value);
107                 }
108
109                 int IList.IndexOf (object value)
110                 {
111                         return IndexOf ((EncryptionProperty) value);
112                 }
113
114                 void IList.Insert (int index, object value)
115                 {
116                         Insert (index, (EncryptionProperty) value);
117                 }
118
119                 void IList.Remove (object value)
120                 {
121                         Remove ((EncryptionProperty) value);
122                 }
123
124                 public int IndexOf (EncryptionProperty value)
125                 {
126                         return list.IndexOf (value);
127                 }
128
129                 public void Insert (int index, EncryptionProperty value)
130                 {
131                         list.Insert (index, value);
132                 }
133
134                 public void Remove (EncryptionProperty value)
135                 {
136                         list.Remove (value);
137                 }
138
139                 public void RemoveAt (int index)
140                 {
141                         list.RemoveAt (index);
142                 }
143
144                 #endregion // Methods
145         }
146 }
147
148 #endif