(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Data / System.Data / DataViewManager.cs
blobb62e0a0cca418d9bbb3ce2c300adec055c7d1fff
1 //
2 // System.Data.DataViewManager
3 //
4 // Author:
5 // Rodrigo Moya (rodrigo@ximian.com)
6 // Tim Coleman (tim@timcoleman.com)
7 //
8 // (C) Ximian, Inc. 2002
9 // Copyright (C) Tim Coleman, 2002
13 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
15 // Permission is hereby granted, free of charge, to any person obtaining
16 // a copy of this software and associated documentation files (the
17 // "Software"), to deal in the Software without restriction, including
18 // without limitation the rights to use, copy, modify, merge, publish,
19 // distribute, sublicense, and/or sell copies of the Software, and to
20 // permit persons to whom the Software is furnished to do so, subject to
21 // the following conditions:
22 //
23 // The above copyright notice and this permission notice shall be
24 // included in all copies or substantial portions of the Software.
25 //
26 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 using System;
36 using System.Collections;
37 using System.ComponentModel;
39 namespace System.Data
41 /// <summary>
42 /// Contains a default DataViewSettingCollection for each DataTable in a DataSet.
43 /// </summary>
44 //[Designer]
45 [DesignerAttribute ("Microsoft.VSDesigner.Data.VS.DataViewManagerDesigner, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.ComponentModel.Design.IDesigner")]
46 public class DataViewManager : MarshalByValueComponent, IBindingList, ICollection, IList, ITypedList, IEnumerable
48 #region Fields
50 DataSet dataSet;
51 DataViewManagerListItemTypeDescriptor descriptor;
53 #endregion // Fields
55 #region Constructors
57 public DataViewManager ()
59 dataSet = null;
62 public DataViewManager (DataSet ds)
64 dataSet = ds;
67 #endregion // Constructors
69 #region Properties
71 [DataSysDescription ("Indicates the source of data for this DataViewManager.")]
72 [DefaultValue (null)]
73 public DataSet DataSet {
74 get { return dataSet; }
75 set { dataSet = value; }
78 [MonoTODO]
79 public string DataViewSettingCollectionString {
80 get { throw new NotImplementedException (); }
81 set { throw new NotImplementedException (); }
84 [MonoTODO]
85 [DataSysDescription ("Indicates the sorting/filtering/state settings for any table in the corresponding DataSet.")]
86 [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
87 public DataViewSettingCollection DataViewSettings {
88 get { throw new NotImplementedException (); }
91 int ICollection.Count {
92 [MonoTODO]
93 get { throw new NotImplementedException (); }
96 bool ICollection.IsSynchronized {
97 [MonoTODO]
98 get { throw new NotImplementedException (); }
101 object ICollection.SyncRoot {
102 [MonoTODO]
103 get { throw new NotImplementedException (); }
106 bool IList.IsFixedSize {
107 get { return true; }
110 bool IList.IsReadOnly {
111 get { return true; }
114 object IList.this [int index] {
115 get {
116 if (descriptor == null)
117 descriptor = new DataViewManagerListItemTypeDescriptor (this);
119 return descriptor;
122 set { throw new ArgumentException ("Not modifiable"); }
125 bool IBindingList.AllowEdit {
126 [MonoTODO]
127 get { throw new NotImplementedException (); }
130 bool IBindingList.AllowNew {
131 [MonoTODO]
132 get { throw new NotImplementedException (); }
135 bool IBindingList.AllowRemove {
136 [MonoTODO]
137 get { throw new NotImplementedException (); }
140 bool IBindingList.IsSorted {
141 [MonoTODO]
142 get { throw new NotImplementedException (); }
145 ListSortDirection IBindingList.SortDirection {
146 [MonoTODO]
147 get { throw new NotImplementedException (); }
150 PropertyDescriptor IBindingList.SortProperty {
151 [MonoTODO]
152 get { throw new NotImplementedException (); }
155 bool IBindingList.SupportsChangeNotification {
156 [MonoTODO]
157 get { throw new NotImplementedException (); }
160 bool IBindingList.SupportsSearching {
161 [MonoTODO]
162 get { throw new NotImplementedException (); }
165 bool IBindingList.SupportsSorting {
166 [MonoTODO]
167 get { throw new NotImplementedException (); }
170 #endregion // Properties
172 #region Methods
174 [MonoTODO]
175 public DataView CreateDataView (DataTable table)
177 return new DataView (table);
180 [MonoTODO]
181 void IBindingList.AddIndex (PropertyDescriptor property)
183 throw new NotImplementedException ();
186 [MonoTODO]
187 object IBindingList.AddNew ()
189 throw new NotImplementedException ();
192 [MonoTODO]
193 void IBindingList.ApplySort (PropertyDescriptor property, ListSortDirection direction)
195 throw new NotImplementedException ();
198 [MonoTODO]
199 int IBindingList.Find (PropertyDescriptor property, object key)
201 throw new NotImplementedException ();
204 [MonoTODO]
205 void IBindingList.RemoveIndex (PropertyDescriptor property)
207 throw new NotImplementedException ();
210 [MonoTODO]
211 void IBindingList.RemoveSort ()
213 throw new NotImplementedException ();
216 [MonoTODO]
217 void ICollection.CopyTo (Array array, int index)
219 throw new NotImplementedException ();
222 [MonoTODO]
223 IEnumerator IEnumerable.GetEnumerator ()
225 throw new NotImplementedException ();
228 [MonoTODO]
229 int IList.Add (object value)
231 throw new NotImplementedException ();
234 [MonoTODO]
235 void IList.Clear ()
237 throw new NotImplementedException ();
240 [MonoTODO]
241 bool IList.Contains (object value)
243 throw new NotImplementedException ();
246 [MonoTODO]
247 int IList.IndexOf (object value)
249 throw new NotImplementedException ();
252 [MonoTODO]
253 void IList.Insert (int index, object value)
255 throw new NotImplementedException ();
258 [MonoTODO]
259 void IList.Remove (object value)
261 throw new NotImplementedException ();
264 [MonoTODO]
265 void IList.RemoveAt (int index)
267 throw new NotImplementedException ();
270 PropertyDescriptorCollection ITypedList.GetItemProperties (PropertyDescriptor[] listAccessors)
272 if (dataSet == null)
273 throw new DataException ("dataset is null");
275 if (listAccessors == null || listAccessors.Length == 0) {
276 ICustomTypeDescriptor desc = new DataViewManagerListItemTypeDescriptor (this);
277 return desc.GetProperties ();
280 throw new NotImplementedException ();
283 [MonoTODO]
284 string ITypedList.GetListName (PropertyDescriptor[] listAccessors)
286 throw new NotImplementedException ();
289 protected virtual void OnListChanged (ListChangedEventArgs e)
291 if (ListChanged != null)
292 ListChanged (this, e);
295 protected virtual void RelationCollectionChanged (object sender, CollectionChangeEventArgs e)
299 protected virtual void TableCollectionChanged (object sender, CollectionChangeEventArgs e)
303 #endregion // Methods
305 #region Events
307 public event ListChangedEventHandler ListChanged;
309 #endregion // Events