**** Merged from MCS ****
[mono-project.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services.Security / SecurityElementCollection.cs
blobcee94dacefc362af9f15d13876cd0b6567223ed9
1 //
2 // SecurityElementCollection.cs: Handles WS-Security SecurityElementCollection
3 //
4 // Author:
5 // Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
9 // Licensed under MIT X11 (see LICENSE) with this specific addition:
11 // “This source code may incorporate intellectual property owned by Microsoft
12 // Corporation. Our provision of this source code does not include any licenses
13 // or any other rights to you under any Microsoft intellectual property. If you
14 // would like a license from Microsoft (e.g. rebrand, redistribute), you need
15 // to contact Microsoft directly.”
18 using System;
19 using System.Collections;
21 namespace Microsoft.Web.Services.Security {
23 public class SecurityElementCollection : ICollection, IEnumerable {
25 private ArrayList list;
27 public SecurityElementCollection ()
29 list = new ArrayList ();
32 public int Count {
33 get { return list.Count; }
36 public bool IsSynchronized {
37 get { return list.IsSynchronized; }
40 public ISecurityElement this [int index] {
41 get { return (ISecurityElement) list [index]; }
44 public object SyncRoot {
45 get { return list.SyncRoot; }
48 public void Add (ISecurityElement element)
50 list.Add (element);
53 public void Clear ()
55 list.Clear ();
58 public void CopyTo (Array array, int index)
60 if (array == null)
61 throw new ArgumentNullException ("array");
62 list.CopyTo (array, index);
65 public IEnumerator GetEnumerator ()
67 return list.GetEnumerator ();
70 public void Remove (ISecurityElement element)
72 if (element == null)
73 throw new ArgumentNullException ("element");
74 list.Remove (element);