2 // DsmlResponseDocument.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
7 // Copyright (C) 2009 Novell, Inc.
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 using System.Collections;
35 namespace System.DirectoryServices.Protocols
38 public class DsmlResponseDocument : DsmlDocument, ICollection, IEnumerable
40 ArrayList list = new ArrayList ();
42 public DsmlDocumentProcessing DocumentProcessing { get; set; }
43 public DsmlErrorProcessing ErrorProcessing { get; set; }
46 public override XmlDocument ToXml ()
48 throw new NotImplementedException ();
52 public bool IsErrorResponse { get; private set; }
54 public bool IsOperationError { get; private set; }
56 public string RequestId { get; private set; }
59 get { return list.Count; }
62 protected bool IsFixedSize {
63 get { return list.IsFixedSize; }
66 protected bool IsReadOnly {
67 get { return list.IsReadOnly; }
70 protected bool IsSynchronized {
71 get { return list.IsSynchronized; }
74 public DirectoryResponse this [int index] {
75 get { return (DirectoryResponse) list [index]; }
76 set { list [index] = value; }
79 public string ResponseId { get; set; }
81 public DsmlResponseOrder ResponseOrder { get; set; }
83 protected object SyncRoot {
84 get { return list.SyncRoot; }
87 int ICollection.Count {
91 bool ICollection.IsSynchronized {
92 get { return IsSynchronized; }
95 object ICollection.SyncRoot {
96 get { return SyncRoot; }
99 public int Add (DirectoryResponse request)
101 return list.Add (request);
109 public bool Contains (DirectoryResponse value)
111 return list.Contains (value);
114 public void CopyTo (DirectoryResponse [] value, int i)
116 list.CopyTo (value, i);
119 public IEnumerator GetEnumerator ()
121 return list.GetEnumerator ();
124 public int IndexOf (DirectoryResponse value)
126 return list.IndexOf (value);
129 public void Insert (int index, DirectoryResponse value)
131 list.Insert (index, value);
134 public void Remove (DirectoryResponse value)
139 public void RemoveAt (int index)
141 list.RemoveAt (index);
144 void ICollection.CopyTo (Array value, int i)
146 CopyTo ((DirectoryResponse []) value, i);