1 /******************************************************************************
\r
3 * Copyright (c) 2003 Novell Inc., www.novell.com
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
\r
6 * of this software and associated documentation files (the Software), to deal
\r
7 * in the Software without restriction, including without limitation the rights
\r
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
\r
9 * copies of the Software, and to permit persons to whom the Software is
\r
10 * furnished to do so, subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in
\r
13 * all copies or substantial portions of the Software.
\r
15 * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
\r
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\r
22 *******************************************************************************/
\r
25 // System.DirectoryServices.ResultPropertyCollection .cs
\r
28 // Sunil Kumar (sunilk@novell.com)
\r
34 using System.Collections;
\r
36 namespace System.DirectoryServices
\r
39 /// Contains the properties of a SearchResult instance.
\r
41 /// For a list of all members of this type, see ResultPropertyCollection
\r
45 /// SearchResult instances are similar to DirectoryEntry instances. The
\r
46 /// notable difference is that the DirectoryEntry retrieves its
\r
47 /// information from the Active Directory hierarchy each time a new object
\r
48 /// is accessed, whereas the data for the SearchResult is already
\r
49 /// available in the SearchResultCollection that a DirectorySearcher
\r
50 /// query returns. If you try to get a SearchResult property that your
\r
51 /// query did not specify for retrieval, the property will not be
\r
54 public class ResultPropertyCollection : DictionaryBase
\r
56 public ResultPropertyValueCollection this[string key]
\r
58 get {return (ResultPropertyValueCollection) this.Dictionary[key]; }
\r
60 set { this.Dictionary[key] = value; }
\r
62 //add a ResultPropertyValueCollection based on key
\r
63 public void Add(string key, ResultPropertyValueCollection rpcoll)
\r
65 this.Dictionary.Add(key, rpcoll);
\r
67 //see if collection contains an entry corresponding to key
\r
68 public bool Contains(string key)
\r
70 return this.Dictionary.Contains(key);
\r
73 public ICollection PropertyNames
\r
77 return this.Dictionary.Keys;
\r
81 public ICollection Values
\r
85 return this.Dictionary.Values;
\r