2002-07-21 Tim Coleman <tim@timcoleman.com>
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Protocols / SoapHeaderCollection.cs
1 // \r
2 // System.Web.Services.Protocols.SoapHeaderCollection.cs\r
3 //\r
4 // Author:\r
5 //   Tim Coleman (tim@timcoleman.com)\r
6 //\r
7 // Copyright (C) Tim Coleman, 2002\r
8 //\r
9 \r
10 using System.Collections;\r
11 \r
12 namespace System.Web.Services.Protocols {\r
13         public class SoapHeaderCollection : CollectionBase {\r
14 \r
15                 #region Constructors\r
16 \r
17                 public SoapHeaderCollection ()\r
18                 {\r
19                 }\r
20 \r
21                 #endregion\r
22 \r
23                 #region Properties\r
24 \r
25                 public SoapHeader this [int index] {\r
26                         get { return (SoapHeader) List[index]; }\r
27                         set { List[index] = value; }\r
28                 }\r
29 \r
30                 #endregion // Properties\r
31 \r
32                 #region Methods\r
33 \r
34                 public int Add (SoapHeader header)\r
35                 {\r
36                         Insert (Count, header);\r
37                         return (Count - 1);\r
38                 }\r
39 \r
40                 public bool Contains (SoapHeader header)\r
41                 {\r
42                         return List.Contains (header);\r
43                 }\r
44 \r
45                 public void CopyTo (SoapHeader[] array, int index)\r
46                 {\r
47                         List.CopyTo (array, index);\r
48                 }\r
49 \r
50                 public void Insert (int index, SoapHeader header)\r
51                 {\r
52                         if (index < 0 || index > Count)\r
53                                 throw new ArgumentOutOfRangeException ();\r
54                         List.Insert (index, header);\r
55                 }\r
56 \r
57                 public void Remove (SoapHeader header)\r
58                 {\r
59                         List.Remove (header);\r
60                 }\r
61 \r
62                 #endregion // Methods\r
63         }\r
64 }\r