2 // SecurityElementCollection.cs: Handles WS-Security SecurityElementCollection
5 // Sebastien Pouliot (spouliot@motus.com)
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
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.”
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 ();
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
)
58 public void CopyTo (Array array
, int index
)
61 throw new ArgumentNullException ("array");
62 list
.CopyTo (array
, index
);
65 public IEnumerator
GetEnumerator ()
67 return list
.GetEnumerator ();
70 public void Remove (ISecurityElement element
)
73 throw new ArgumentNullException ("element");
74 list
.Remove (element
);