Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Coleman <tim@mono-cvs.ximian.com>2002-05-24 21:42:12 +0400
committerTim Coleman <tim@mono-cvs.ximian.com>2002-05-24 21:42:12 +0400
commitdf2142c86f5334fce05281b00eb0ee7d25ac2168 (patch)
tree1a74cd6edb83d89c8e968337f32a39a5abe7d315 /mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs
parent58f4951fbae60a08b0b87111d269978eeadba42e (diff)
2002-05-24 Tim Coleman <tim@timcoleman.com>
* System.Data.Common/DbDataAdapter.cs: remove IDbCommands, except for get accessors. These should be implemented in derived classes. See SqlDataAdapter for clues. * System.Data.SqlClient/SqlDataAdapter.cs: implement IDbDataAdapter * System.Data.Common/DataAdapter.cs: * System.Data.Common/DataTableMappingCollection.cs: * System.Data.Common/DataTableMapping.cs: * System.Data.Common/DataColumnMappingCollection.cs: * System.Data.Common/DataColumnMapping.cs: Properly (I hope!) implement all of the appropriate interfaces for these classes. svn path=/trunk/mcs/; revision=4908
Diffstat (limited to 'mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs')
-rw-r--r--mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs52
1 files changed, 48 insertions, 4 deletions
diff --git a/mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs b/mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs
index 0b337d6b0e4..614b979a1b9 100644
--- a/mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs
+++ b/mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs
@@ -17,11 +17,8 @@ namespace System.Data.Common
/// <summary>
/// A collection of DataTableMapping objects. This class cannot be inherited.
/// </summary>
- public sealed class DataTableMappingCollection :
- MarshalByRefObject, // ITableMappingCollection, IList,
- IEnumerable //ICollection,
+ public sealed class DataTableMappingCollection : MarshalByRefObject, ITableMappingCollection, IList, ICollection, IEnumerable
{
-
#region Fields
ArrayList mappings;
@@ -64,6 +61,41 @@ namespace System.Data.Common
set { this[mappings.IndexOf(sourceTables[sourceTable])] = value; }
}
+
+ object IList.this[int index] {
+ get { return (object)(this[index]); }
+ set {
+ if (!(value is DataTableMapping))
+ throw new ArgumentException ();
+ this[index] = (DataTableMapping)value;
+ }
+ }
+
+ bool IList.IsReadOnly {
+ get { return false; }
+ }
+
+ bool IList.IsFixedSize {
+ get { return false; }
+ }
+
+ object ICollection.SyncRoot {
+ get { return mappings.SyncRoot; }
+ }
+
+ bool ICollection.IsSynchronized {
+ get { return mappings.IsSynchronized; }
+ }
+
+ object ITableMappingCollection.this[string sourceTable] {
+ get { return this[sourceTable]; }
+ set {
+ if (!(value is DataTableMapping))
+ throw new ArgumentException ();
+ this[sourceTable] = (DataTableMapping)(value);
+ }
+ }
+
#endregion
#region Methods
@@ -157,6 +189,18 @@ namespace System.Data.Common
}
[MonoTODO]
+ ITableMapping ITableMappingCollection.Add (string sourceTableName, string dataSetTableName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ ITableMapping ITableMappingCollection.GetByDataSetTable (string dataSetTableName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
public void Remove (object value)
{
throw new NotImplementedException ();