2004-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System.Data / System.Data / DataViewManagerListItemTypeDescriptor.cs
1 //
2 // System.Data.DataViewManagerListItemTypeDscriptor
3 //
4 // Authors:
5 //      Gonzalo Paniagua Javier (gonzalo@ximian.com)
6 //
7 // (C) 2002 Ximian, Inc (http://www.ximian.com)
8 //
9
10 using System;
11 using System.ComponentModel;
12
13 namespace System.Data
14 {
15         class DataViewManagerListItemTypeDescriptor : ICustomTypeDescriptor
16         {
17                 DataViewManager dvm;
18                 PropertyDescriptorCollection propsCollection;
19
20                 internal DataViewManagerListItemTypeDescriptor (DataViewManager dvm)
21                 {
22                         this.dvm = dvm;
23                 }
24
25                 internal DataViewManager DataViewManager {
26                         get { return dvm; }
27                 }
28
29                 AttributeCollection ICustomTypeDescriptor.GetAttributes ()
30                 {
31                         return new AttributeCollection (null);
32                 }
33
34                 [MonoTODO]
35                 string ICustomTypeDescriptor.GetClassName ()
36                 {
37                         throw new NotImplementedException ();
38                 }
39
40                 [MonoTODO]
41                 string ICustomTypeDescriptor.GetComponentName ()
42                 {
43                         throw new NotImplementedException ();
44                 }
45
46                 [MonoTODO]
47                 TypeConverter ICustomTypeDescriptor.GetConverter ()
48                 {
49                         throw new NotImplementedException ();
50                 }
51
52                 [MonoTODO]
53                 EventDescriptor ICustomTypeDescriptor.GetDefaultEvent ()
54                 {
55                         throw new NotImplementedException ();
56                 }
57
58                 [MonoTODO]
59                 PropertyDescriptor ICustomTypeDescriptor.GetDefaultProperty ()
60                 {
61                         throw new NotImplementedException ();
62                 }
63
64                 [MonoTODO]
65                 object ICustomTypeDescriptor.GetEditor (Type editorBaseType)
66                 {
67                         throw new NotImplementedException ();
68                 }
69
70                 [MonoTODO]
71                 EventDescriptorCollection ICustomTypeDescriptor.GetEvents ()
72                 {
73                         throw new NotImplementedException ();
74                 }
75
76                 [MonoTODO]
77                 EventDescriptorCollection ICustomTypeDescriptor.GetEvents (System.Attribute[] attributes)
78                 {
79                         throw new NotImplementedException ();
80                 }
81
82                 PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties ()
83                 {
84                         DataSet ds = dvm.DataSet;
85                         if (ds == null)
86                                 return null;
87
88                         DataTableCollection tables = ds.Tables;
89                         int index = 0;
90                         PropertyDescriptor [] descriptors  = new PropertyDescriptor [tables.Count];
91                         foreach (DataTable table in tables)
92                                 descriptors [index++] = new DataTablePropertyDescriptor (table);
93
94                         return new PropertyDescriptorCollection (descriptors);
95                 }
96
97                 [MonoTODO]
98                 PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties (System.Attribute[] attributes)
99                 {
100                         throw new NotImplementedException ();
101                 }
102
103                 [MonoTODO]
104                 object ICustomTypeDescriptor.GetPropertyOwner (PropertyDescriptor pd)
105                 {
106                         throw new NotImplementedException ();
107                 }
108         }
109 }
110