2 // EncryptionProperties.cs - EncryptionProperties implementation for XML Encryption
3 // http://www.w3.org/2001/04/xmlenc#sec-EncryptionProperties
6 // Tim Coleman (tim@timcoleman.com)
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:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
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.
33 using System
.Collections
;
36 namespace System
.Security
.Cryptography
.Xml
{
37 public sealed class EncryptionProperties
: IList
, ICollection
, IEnumerable
{
47 public EncryptionProperties ()
49 list
= new ArrayList ();
52 #endregion // Constructors
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
90 public int Add (EncryptionProperty
value)
92 return list
.Add (value);
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)
160 public void RemoveAt (int index
)
162 list
.RemoveAt (index
);
165 #endregion // Methods