New test.
[mono.git] / mcs / class / System.DirectoryServices / System.DirectoryServices / ResultPropertyValueCollection.cs
1 /******************************************************************************
2 * The MIT License
3 * Copyright (c) 2003 Novell Inc.,  www.novell.com
4
5 * Permission is hereby granted, free of charge, to any person obtaining  a copy
6 * of this software and associated documentation files (the Software), to deal
7 * in the Software without restriction, including  without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
9 * copies of the Software, and to  permit persons to whom the Software is 
10 * furnished to do so, subject to the following conditions:
11
12 * The above copyright notice and this permission notice shall be included in 
13 * all copies or substantial portions of the Software.
14
15 * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *******************************************************************************/
23
24 //
25 // System.DirectoryServices.ResultPropertyValueCollection .cs
26 //
27 // Author:
28 //   Sunil Kumar (sunilk@novell.com)
29 //
30 // (C)  Novell Inc.
31 //
32
33 using System;
34 using System.Collections;
35
36 namespace System.DirectoryServices
37 {
38         /// <summary>
39         /// Contains the values of a SearchResult property.
40         /// </summary>
41         /// <remarks>
42         /// SearchResult instances are similar to DirectoryEntry instances. The 
43         /// notable difference is that the DirectoryEntry retrieves its 
44         /// information from the Active Directory hierarchy each time a new object 
45         /// is accessed, whereas the data for the SearchResult is already 
46         /// available in the SearchResultCollection that a DirectorySearcher 
47         /// query returns. If you try to get a SearchResult property that your 
48         /// query did not specify for retrieval, the property will not be 
49         /// available.
50         /// </remarks>
51         public class ResultPropertyValueCollection  : ReadOnlyCollectionBase
52         {
53                 internal ResultPropertyValueCollection()
54                 {
55                 }
56
57                 internal void Add (object component)
58                 {
59                         InnerList.Add (component);
60                 }
61
62                 internal void AddRange (object[] components)
63                 {
64                         InnerList.AddRange (components);
65                 }
66
67                 public virtual object this [int index] 
68                 {
69                         get { return (object) InnerList[index]; }
70                 }
71
72                 public bool Contains (object value)
73                 {
74                         return InnerList.Contains (value);
75                 }
76
77                 public void CopyTo (object[] array, int index)
78                 {
79                         InnerList.CopyTo (array, index);
80                 }
81
82                 public int IndexOf (object value)
83                 {
84                         return InnerList.IndexOf (value);
85                 }
86
87
88         }
89 }
90