diff options
author | Tim Coleman <tim@mono-cvs.ximian.com> | 2003-12-17 04:59:11 +0300 |
---|---|---|
committer | Tim Coleman <tim@mono-cvs.ximian.com> | 2003-12-17 04:59:11 +0300 |
commit | 7b11d92602703ff83aa2ba2559ea293cbf0283d5 (patch) | |
tree | b3072e49e9ae69d91ddc5f6d0c727251d2a2009c /mcs/class | |
parent | aadaf043bb9829f45320c6db29db2d41ef45e0c8 (diff) |
2003-12-16 Tim Coleman <tim@timcoleman.com>
* CatalogLocation.cs DbCommand.cs DbCommandBuilder.cs
* DbCommandOptionalFeatures.cs DbCommandSet.cs DbConnection.cs
* DbConnectionString.cs DbDataSourceEnumerator.cs
* DbDataUpdatableRecord.cs DbParameter.cs DbParameterCollection.cs
* DbProviderConfigurationHandler.cs DbProviderFactories.cs
* DbProviderFactoriesConfigurationHandler.cs DbProviderFactory.cs
* DbProviderSupportedClasses.cs DbTable.cs DbTransaction.cs
* GroupByBehavior.cs IdentifierCase.cs SchemaLocation.cs
* SchemaTableColumn.cs:
New stubs added for .NET 1.2
* DataAdapter.cs DataColumnMapping.cs DataColumnMappingCollection.cs
* DataTableMapping.cs DataTableMappingCollection.cs DbDataAdapter.cs
* DbDataPermission.cs DbDataPermissionAttribute.cs DbDataRecord.cs
* FieldNameLookup.cs SchemaInfo.cs:
Changes made for .NET 1.2
svn path=/trunk/mcs/; revision=21259
Diffstat (limited to 'mcs/class')
34 files changed, 2275 insertions, 8 deletions
diff --git a/mcs/class/System.Data/System.Data.Common/CatalogLocation.cs b/mcs/class/System.Data/System.Data.Common/CatalogLocation.cs new file mode 100644 index 00000000000..b71c8085bd3 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/CatalogLocation.cs @@ -0,0 +1,20 @@ +// +// System.Data.Common.CatalogLocation.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public enum CatalogLocation + { + End, + Start + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/ChangeLog b/mcs/class/System.Data/System.Data.Common/ChangeLog index eda23210f36..1727d64724d 100755 --- a/mcs/class/System.Data/System.Data.Common/ChangeLog +++ b/mcs/class/System.Data/System.Data.Common/ChangeLog @@ -1,3 +1,20 @@ +2003-12-16 Tim Coleman <tim@timcoleman.com> + * CatalogLocation.cs DbCommand.cs DbCommandBuilder.cs + * DbCommandOptionalFeatures.cs DbCommandSet.cs DbConnection.cs + * DbConnectionString.cs DbDataSourceEnumerator.cs + * DbDataUpdatableRecord.cs DbParameter.cs DbParameterCollection.cs + * DbProviderConfigurationHandler.cs DbProviderFactories.cs + * DbProviderFactoriesConfigurationHandler.cs DbProviderFactory.cs + * DbProviderSupportedClasses.cs DbTable.cs DbTransaction.cs + * GroupByBehavior.cs IdentifierCase.cs SchemaLocation.cs + * SchemaTableColumn.cs: + New stubs added for .NET 1.2 + * DataAdapter.cs DataColumnMapping.cs DataColumnMappingCollection.cs + * DataTableMapping.cs DataTableMappingCollection.cs DbDataAdapter.cs + * DbDataPermission.cs DbDataPermissionAttribute.cs DbDataRecord.cs + * FieldNameLookup.cs SchemaInfo.cs: + Changes made for .NET 1.2 + 2003-10-22 Eran Domb <erand@miansoft.com> * DbDataAdapter.cs : Check if there is mapping to avoid exception. diff --git a/mcs/class/System.Data/System.Data.Common/DataAdapter.cs b/mcs/class/System.Data/System.Data.Common/DataAdapter.cs index c6b75964434..127edaa46a7 100644 --- a/mcs/class/System.Data/System.Data.Common/DataAdapter.cs +++ b/mcs/class/System.Data/System.Data.Common/DataAdapter.cs @@ -6,7 +6,7 @@ // Tim Coleman (tim@timcoleman.com) // // (C) Ximian, Inc -// Copyright (C) 2002 Tim Coleman +// Copyright (C) Tim Coleman, 2002-2003 // using System.ComponentModel; @@ -27,6 +27,12 @@ namespace System.Data.Common private MissingSchemaAction missingSchemaAction; private DataTableMappingCollection tableMappings; +#if NET_1_2 + private bool acceptChangesDuringUpdate; + private LoadOption fillLoadOption; + private bool returnProviderSpecificTypes; +#endif + #endregion #region Constructors @@ -52,6 +58,13 @@ namespace System.Data.Common set { acceptChangesDuringFill = value; } } +#if NET_1_2 + public bool AcceptChangesDuringUpdate { + get { return acceptChangesDuringUpdate; } + set { acceptChangesDuringUpdate = value; } + } +#endif + [DataCategory ("Update")] [DataSysDescription ("Whether or not to continue to the next DataRow when the Update events, RowUpdating and RowUpdated, Status is UpdateStatus.ErrorsOccurred.")] [DefaultValue (false)] @@ -60,6 +73,13 @@ namespace System.Data.Common set { continueUpdateOnError = value; } } +#if NET_1_2 + public LoadOption FillLoadOption { + get { return fillLoadOption; } + set { fillLoadOption = value; } + } +#endif + ITableMappingCollection IDataAdapter.TableMappings { get { return TableMappings; } } @@ -80,6 +100,13 @@ namespace System.Data.Common set { missingSchemaAction = value; } } +#if NET_1_2 + public virtual bool ReturnProviderSpecificTypes { + get { return returnProviderSpecificTypes; } + set { returnProviderSpecificTypes = value; } + } +#endif + [DataCategory ("Mapping")] [DataSysDescription ("How to map source table to DataSet table.")] [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)] @@ -89,6 +116,14 @@ namespace System.Data.Common #endregion + #region Events + +#if NET_1_2 + public event FillErrorEventHandler FillError; +#endif + + #endregion + #region Methods #if NET_1_1 @@ -113,9 +148,89 @@ namespace System.Data.Common } public abstract int Fill (DataSet dataSet); + +#if NET_1_2 + [MonoTODO] + protected virtual int Fill (DataTable dataTable, IDataReader dataReader) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual int Fill (DataTable[] dataTables, IDataReader dataReader, int startRecord, int maxRecords) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual int Fill (DataSet dataSet, string srcTable, IDataReader dataReader, int startRecord, int maxRecords) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static int FillDataSet (IDataReader dataReader, LoadOption fillLoadOption, DataSet dataSet) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static int FillDataTable (IDataReader dataReader, LoadOption fillLoadOption, DataTable[] dataTables) + { + throw new NotImplementedException (); + } +#endif + public abstract DataTable[] FillSchema (DataSet dataSet, SchemaType schemaType); + +#if NET_1_2 + [MonoTODO] + protected virtual DataTable FillSchema (DataTable dataTable, SchemaType schemaType, IDataReader dataReader) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual DataTable[] FillSchema (DataSet dataSet, SchemaType schemaType, string srcTable, IDataReader dataReader) + { + throw new NotImplementedException (); + } +#endif + public abstract IDataParameter[] GetFillParameters (); +#if NET_1_2 + [MonoTODO] + protected bool HasTableMappings () + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual void OnFillError (FillErrorEventArgs value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public void ResetFillLoadOption () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual bool ShouldSerializeAcceptChangesDuringFill () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual bool ShouldSerializeFillLoadOption () + { + throw new NotImplementedException (); + } +#endif + [MonoTODO] protected virtual bool ShouldSerializeTableMappings () { diff --git a/mcs/class/System.Data/System.Data.Common/DataColumnMapping.cs b/mcs/class/System.Data/System.Data.Common/DataColumnMapping.cs index e25bb52cf09..168ff33e720 100644 --- a/mcs/class/System.Data/System.Data.Common/DataColumnMapping.cs +++ b/mcs/class/System.Data/System.Data.Common/DataColumnMapping.cs @@ -6,7 +6,7 @@ // Tim Coleman (tim@timcoleman.com) // // (C) Ximian, Inc -// Copyright (C) Tim Coleman, 2002 +// Copyright (C) Tim Coleman, 2002-2003 // using System.ComponentModel; @@ -70,6 +70,14 @@ namespace System.Data.Common { return new DataColumn (dataSetColumn, dataType); } +#if NET_1_2 + [MonoTODO] + public static DataColumn GetDataColumnBySchemaAction (string sourceColumn, string dataSetColumn, DataTable dataTable, Type dataType, MissingSchemaAction schemaAction) + { + throw new NotImplementedException (); + } +#endif + object ICloneable.Clone () { return new DataColumnMapping (SourceColumn, DataSetColumn); diff --git a/mcs/class/System.Data/System.Data.Common/DataColumnMappingCollection.cs b/mcs/class/System.Data/System.Data.Common/DataColumnMappingCollection.cs index 0fac2bc4f47..0f89115a21c 100644 --- a/mcs/class/System.Data/System.Data.Common/DataColumnMappingCollection.cs +++ b/mcs/class/System.Data/System.Data.Common/DataColumnMappingCollection.cs @@ -6,7 +6,7 @@ // Tim Coleman (tim@timcoleman.com) // // (C) Ximian, Inc -// Copyright (C) Tim Coleman, 2002 +// Copyright (C) Tim Coleman, 2002-2003 // using System; @@ -122,6 +122,14 @@ namespace System.Data.Common { return mapping; } +#if NET_1_2 + [MonoTODO] + public void AddRange (Array values) + { + throw new NotImplementedException (); + } +#endif + public void AddRange (DataColumnMapping[] values) { foreach (DataColumnMapping mapping in values) @@ -165,6 +173,14 @@ namespace System.Data.Common { return new DataColumnMapping (sourceColumn, sourceColumn); } +#if NET_1_2 + [MonoTODO] + public static DataColumn GetDataColumn (DataColumnMappingCollection columnMappings, string sourceColumn, Type dataType, DataTable dataTable, MissingMappingAction mappingAction, MissingSchemaAction schemaAction) + { + throw new NotImplementedException (); + } +#endif + public IEnumerator GetEnumerator () { return list.GetEnumerator (); diff --git a/mcs/class/System.Data/System.Data.Common/DataTableMapping.cs b/mcs/class/System.Data/System.Data.Common/DataTableMapping.cs index 04f3dcaebc8..ab8c0e10e0a 100644 --- a/mcs/class/System.Data/System.Data.Common/DataTableMapping.cs +++ b/mcs/class/System.Data/System.Data.Common/DataTableMapping.cs @@ -6,7 +6,7 @@ // Tim Coleman (tim@timcoleman.com) // // (C) Ximian, Inc -// Copyright (C) Tim Coleman, 2002 +// Copyright (C) Tim Coleman, 2002-2003 // using System.ComponentModel; @@ -83,6 +83,14 @@ namespace System.Data.Common { return DataColumnMappingCollection.GetColumnMappingBySchemaAction (columnMappings, sourceColumn, mappingAction); } +#if NET_1_2 + [MonoTODO] + public DataColumn GetDataColumn (string sourceColumn, Type dataType, DataTable dataTable, MissingMappingAction mappingAction, MissingSchemaAction schemaAction) + { + throw new NotImplementedException (); + } +#endif + [EditorBrowsable (EditorBrowsableState.Advanced)] public DataTable GetDataTableBySchemaAction (DataSet dataSet, MissingSchemaAction schemaAction) { diff --git a/mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs b/mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs index 30d71ff489a..c9be8e0f614 100644 --- a/mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs +++ b/mcs/class/System.Data/System.Data.Common/DataTableMappingCollection.cs @@ -6,7 +6,7 @@ // Tim Coleman (tim@timcoleman.com) // // (C) Ximian, Inc -// Copyright (C) 2002 Tim Coleman +// Copyright (C) Tim Coleman, 2002-2003 // using System; @@ -120,6 +120,14 @@ namespace System.Data.Common { return mapping; } +#if NET_1_2 + [MonoTODO] + public void AddRange (Array values) + { + throw new NotImplementedException (); + } +#endif + public void AddRange (DataTableMapping[] values) { foreach (DataTableMapping dataTableMapping in values) diff --git a/mcs/class/System.Data/System.Data.Common/DbCommand.cs b/mcs/class/System.Data/System.Data.Common/DbCommand.cs new file mode 100644 index 00000000000..4bd058ce304 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbCommand.cs @@ -0,0 +1,130 @@ +// +// System.Data.Common.DbCommand +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.ComponentModel; +using System.Data; + +namespace System.Data.Common { + public abstract class DbCommand : Component, IDbCommand, IDisposable + { + protected DbCommand () + { + } + + #region Properties + + public abstract string CommandText { get; set; } + public abstract int CommandTimeout { get; set; } + public abstract CommandType CommandType { get; set; } + + public DbConnection Connection { + get { return DbConnection; } + set { DbConnection = value; } + } + + protected abstract DbConnection DbConnection { get; set; } + protected abstract DbParameterCollection DbParameterCollection { get; set; } + protected abstract DbTransaction DbTransaction { get; set; } + public abstract bool DesignTimeVisible { get; set; } + + IDbConnection IDbCommand.Connection { + get { return Connection; } + set { Connection = (DbConnection) value; } + } + + IDataParameterCollection IDbCommand.Parameters { + get { return Parameters; } + } + + IDbTransaction IDbCommand.Transaction { + get { return Transaction; } + set { Transaction = (DbTransaction) value; } + } + + [MonoTODO] + public virtual DbCommandOptionalFeatures OptionalFeatures { + get { throw new NotImplementedException (); } + } + + public DbParameterCollection Parameters { + get { return DbParameterCollection; } + } + + public DbTransaction Transaction { + get { return DbTransaction; } + set { DbTransaction = value; } + } + + public abstract UpdateRowSource UpdatedRowSource { get; set; } + + #endregion // Properties + + #region Methods + + public abstract void Cancel (); + protected abstract DbParameter CreateDbParameter (); + + public DbParameter CreateParameter () + { + return CreateDbParameter (); + } + + protected abstract DbDataReader ExecuteDbDataReader (CommandBehavior behavior); + + [MonoTODO] + protected virtual DbDataReader ExecuteDbPageReader (CommandBehavior behavior, int startRecord, int maxRecords) + { + throw new NotImplementedException (); + } + + public abstract int ExecuteNonQuery (); + public DbDataReader ExecutePageReader (CommandBehavior behavior, int startRecord, int maxRecords) + { + return ExecuteDbPageReader (behavior, startRecord, maxRecords); + } + + [MonoTODO] + public DbDataReader ExecuteReader () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbDataReader ExecuteReader (CommandBehavior behavior) + { + throw new NotImplementedException (); + } + + public abstract object ExecuteScalar (); + + IDbDataParameter IDbCommand.CreateParameter () + { + return CreateParameter (); + } + + IDataReader IDbCommand.ExecuteReader () + { + return ExecuteReader (); + } + + IDataReader IDbCommand.ExecuteReader (CommandBehavior behavior) + { + return ExecuteReader (behavior); + } + + public abstract void Prepare (); + + #endregion // Methods + + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs b/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs new file mode 100644 index 00000000000..58cda0aab23 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs @@ -0,0 +1,208 @@ +// +// System.Data.Common.DbCommandBuilder +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.ComponentModel; +using System.Data; + +namespace System.Data.Common { + public abstract class DbCommandBuilder : Component + { + #region Constructors + + [MonoTODO] + protected DbCommandBuilder () + { + } + + #endregion // Constructors + + #region Properties + + [MonoTODO] + public virtual CatalogLocation CatalogLocation { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public virtual string CatalogSeparator { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public virtual ConflictOptions ConflictDetection { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DbDataAdapter DataAdapter { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + protected abstract DbProviderFactory ProviderFactory { get; } + + [MonoTODO] + public virtual string QuotePrefix { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public virtual string QuoteSuffix { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public SchemaLocation SchemaLocation { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public virtual string SchemaSeparator { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + #endregion // Properties + + #region Methods + + protected abstract void ApplyParameterInfo (IDbDataParameter p, DataRow row); + + [MonoTODO] + protected virtual void BuildCache (bool closeConnection, DataRow dataRow) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected override void Dispose (bool disposing) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static Delegate FindBUilder (MulticastDelegate mcd) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual string FormatLiteral (DbConnection connection, string dataTypeName, object value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbCommand GetDeleteCommand () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbCommand GetDeleteCommand (DataRow dataRow) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbCommand GetInsertCommand () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbCommand GetInsertCommand (DataRow dataRow) + { + throw new NotImplementedException (); + } + + protected abstract string GetParameterName (int parameterOrdinal); + protected abstract string GetParameterPlaceholder (int parameterOrdinal); + + [MonoTODO] + protected DbCommand GetSelectCommand () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbCommand GetUpdateCommand () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbCommand GetUpdateCommand (DataRow dataRow) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual DbCommand InitializeCommand (DbCommand command) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected internal static string[] ParseProcedureName (string procedure) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual string QuoteIdentifier (string unquotedIdentifier) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void RefreshSchema () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void ResolveObjectName (DbConnection connection, string objectType, string[] identifierParts) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected void RowUpdatingHandler (object sender, RowUpdatingEventArgs rowUpdatingEvent) + { + throw new NotImplementedException (); + } + + protected abstract void SetRowUpdatingHandler (DbDataAdapter adapter); + + [MonoTODO] + public virtual object UnformatLiteral (DbConnection connection, string dataTypeName, string literalValue) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual string UnquoteIdentifier (string quotedIdentifier) + { + throw new NotImplementedException (); + } + + #endregion // Methods + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/DbCommandOptionalFeatures.cs b/mcs/class/System.Data/System.Data.Common/DbCommandOptionalFeatures.cs new file mode 100644 index 00000000000..97493e5bbaf --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbCommandOptionalFeatures.cs @@ -0,0 +1,20 @@ +// +// System.Data.Common.DbCommandOptionalFeatures.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public enum DbCommandOptionalFeatures + { + ExecutePageReader, + None + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/DbCommandSet.cs b/mcs/class/System.Data/System.Data.Common/DbCommandSet.cs new file mode 100644 index 00000000000..9318cb7fcf3 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbCommandSet.cs @@ -0,0 +1,76 @@ +// +// System.Data.Common.DbCommandSet +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.ComponentModel; +using System.Data; + +namespace System.Data.Common { + public abstract class DbCommandSet : IDisposable + { + #region Constructors + + protected DbCommandSet () + { + } + + #endregion // Constructors + + #region Properties + + public abstract int CommandCount { get; } + public abstract int CommandTimeout { get; set; } + + public DbConnection Connection { + get { return DbConnection; } + set { DbConnection = value; } + } + + protected abstract DbConnection DbConnection { get; set; } + protected abstract DbTransaction DbTransaction { get; set; } + + public DbTransaction Transaction { + get { return DbTransaction; } + } + + #endregion // Properties + + #region Methods + + public abstract void Append (DbCommand command); + public abstract void Cancel (); + public abstract void Clear (); + public abstract void CopyToParameter (int commandIndex, int parameterIndex, DbParameter destination); + public abstract void CopyToParameter (int commandIndex, string parameterName, DbParameter destination); + public abstract void CopyToParameterCollection (int commandIndex, DbParameterCollection destination); + public abstract void Dispose (); + public abstract DbDataReader ExecuteDbDataReader (CommandBehavior behavior); + public abstract int ExecuteNonQuery (); + + [MonoTODO] + public DbDataReader ExecuteReader () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbDataReader ExecuteReader (CommandBehavior behavior) + { + throw new NotImplementedException (); + } + + public abstract int GetParameterCount (int commandIndex); + + #endregion // Methods + + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/DbConnection.cs b/mcs/class/System.Data/System.Data.Common/DbConnection.cs new file mode 100644 index 00000000000..91f046e1c91 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbConnection.cs @@ -0,0 +1,110 @@ +// +// System.Data.Common.DbConnection +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.ComponentModel; +using System.Data; +using System.EnterpriseServices; + +namespace System.Data.Common { + public abstract class DbConnection : Component, IDbConnection, IDisposable + { + #region Constructors + + protected DbConnection () + { + } + + #endregion // Constructors + + #region Properties + + public abstract string ConnectionString { get; set; } + public abstract int ConnectionTimeout { get; } + public abstract string Database { get; } + public abstract string DataSource { get; } + public abstract string ServerVersion { get; } + public abstract ConnectionState State { get; } + + #endregion // Properties + + #region Methods + + protected abstract DbTransaction BeginDbTransaction (IsolationLevel isolationLevel); + + [MonoTODO] + public DbTransaction BeginTransaction () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DbTransaction BeginTransaction (IsolationLevel isolationLevel) + { + throw new NotImplementedException (); + } + + public abstract void ChangeDatabase (string databaseName); + public abstract void Close (); + + public DbCommand CreateCommand () + { + return CreateDbCommand (); + } + + protected abstract DbCommand CreateDbCommand (); + + [MonoTODO] + public virtual void EnlistDistributedTransaction (ITransaction transaction) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DataTable GetSchema () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DataTable GetSchema (string collectionName) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DataTable GetSchema (string collectionName, string[] restrictionValues) + { + throw new NotImplementedException (); + } + + IDbTransaction IDbConnection.BeginTransaction () + { + return BeginTransaction (); + } + + IDbTransaction IDbConnection.BeginTransaction (IsolationLevel il) + { + return BeginTransaction (il); + } + + IDbCommand IDbConnection.CreateCommand () + { + return CreateCommand (); + } + + public abstract void Open (); + + #endregion // Methods + + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/DbConnectionString.cs b/mcs/class/System.Data/System.Data.Common/DbConnectionString.cs new file mode 100644 index 00000000000..29c60abf8b5 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbConnectionString.cs @@ -0,0 +1,161 @@ +// +// System.Data.Common.DbConnectionString +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.Collections; +using System.Data; +using System.Runtime.Serialization; +using System.Text; + +namespace System.Data.Common { + public class DbConnectionString : ISerializable + { + #region Fields + + KeyRestrictionBehavior behavior; + + #endregion // Fields + + #region Constructors + + [MonoTODO] + protected internal DbConnectionString (DbConnectionString constr) + { + } + + [MonoTODO] + public DbConnectionString (string connectionString) + { + } + + [MonoTODO] + protected DbConnectionString (SerializationInfo si, StreamingContext sc) + { + } + + [MonoTODO] + public DbConnectionString (string connectionString, string restrictions, KeyRestrictionBehavior behavior) + { + this.behavior = behavior; + } + + #endregion // Constructors + + #region Properties + + public KeyRestrictionBehavior Behavior { + get { return behavior; } + } + + [MonoTODO] + protected virtual string CacheConnectionString { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public bool IsEmpty { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public string this [string x] { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public ICollection Keys { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public string NormalizedConnectionString { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public string Restrictions { + get { throw new NotImplementedException (); } + } + + #endregion // Properties + + #region Methods + + public static void AppendKeyValuePairBuilder (StringBuilder builder, string keyname, string keyvalue) + { + throw new NotImplementedException (); + } + + protected void BuildConnectionString (StringBuilder builder, string[] withoutOptions, string insertValue) + { + throw new NotImplementedException (); + } + + public bool ContainsKey (string keyword) + { + throw new NotImplementedException (); + } + + public bool ConvertValueToBoolean (string keyname, bool defaultvalue) + { + throw new NotImplementedException (); + } + + public int ConvertValueToInt32 (string keyname, int defaultvalue) + { + throw new NotImplementedException (); + } + + public bool ConvertValueToIntegratedSecurity () + { + throw new NotImplementedException (); + } + + public string ConvertValueToString (string keyname, string defaultValue) + { + throw new NotImplementedException (); + } + + public virtual void GetObjectData (SerializationInfo info, StreamingContext context) + { + throw new NotImplementedException (); + } + + protected virtual string KeywordLookup (string keyname) + { + throw new NotImplementedException (); + } + + protected void ParseConnectionString (string connectionString) + { + throw new NotImplementedException (); + } + + public virtual void PermissionDemand () + { + throw new NotImplementedException (); + } + + public static string RemoveKeyValuePairs (string connectionString, string[] keynames) + { + throw new NotImplementedException (); + } + + public string UsersConnectionString (bool hisPasswordPwd) + { + throw new NotImplementedException (); + } + + #endregion // Methods + + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs b/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs index 7db1b6ba83c..573520fd987 100644 --- a/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs +++ b/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs @@ -6,13 +6,14 @@ // Tim Coleman (tim@timcoleman.com) // // (C) Ximian, Inc -// Copyright (C) 2002 Tim Coleman +// Copyright (C) Tim Coleman, 2002-2003 // using System; using System.Collections; using System.ComponentModel; using System.Data; +using System.Runtime.InteropServices; namespace System.Data.Common { public abstract class DbDataAdapter : DataAdapter, ICloneable @@ -34,18 +35,63 @@ namespace System.Data.Common { #region Properties +#if NET_1_2 + [MonoTODO] + protected virtual IDbConnection BaseConnection { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public IDbConnection Connection { + get { return BaseConnection; } + set { BaseConnection = value; } + } +#endif + IDbCommand DeleteCommand { get { return ((IDbDataAdapter) this).DeleteCommand; } } +#if NET_1_2 + protected internal CommandBehavior FillCommandBehavior { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } +#endif + IDbCommand InsertCommand { get { return ((IDbDataAdapter) this).InsertCommand; } } +#if NET_1_2 + [MonoTODO] + protected virtual IDbCommand this [[Optional] StatementType statementType] { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + protected virtual DbProviderFactory ProviderFactory { + get { throw new NotImplementedException (); } + } +#endif + IDbCommand SelectCommand { get { return ((IDbDataAdapter) this).SelectCommand; } } +#if NET_1_2 + [MonoTODO] + public IDbTransaction Transaction { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public int UpdateBatchSize { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } +#endif IDbCommand UpdateCommand { get { return ((IDbDataAdapter) this).UpdateCommand; } @@ -55,14 +101,25 @@ namespace System.Data.Common { #region Events +#if ONLY_1_0 || ONLY_1_1 + [DataCategory ("Fill")] [DataSysDescription ("Event triggered when a recoverable error occurs during Fill.")] public event FillErrorEventHandler FillError; +#endif #endregion // Events #region Methods +#if NET_1_2 + [MonoTODO] + public virtual void BeginInit () + { + throw new NotImplementedException (); + } +#endif + protected abstract RowUpdatedEventArgs CreateRowUpdatedEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping); protected abstract RowUpdatingEventArgs CreateRowUpdatingEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping); @@ -97,6 +154,14 @@ namespace System.Data.Common { } } +#if NET_1_2 + [MonoTODO] + public virtual void EndInit () + { + throw new NotImplementedException (); + } +#endif + public override int Fill (DataSet dataSet) { return Fill (dataSet, 0, 0, DefaultSourceTableName, SelectCommand, CommandBehavior.Default); @@ -115,7 +180,11 @@ namespace System.Data.Common { return Fill (dataSet, 0, 0, srcTable, SelectCommand, CommandBehavior.Default); } +#if NET_1_2 + protected override int Fill (DataTable dataTable, IDataReader dataReader) +#else protected virtual int Fill (DataTable dataTable, IDataReader dataReader) +#endif { int count = 0; bool doContinue = true; @@ -180,12 +249,32 @@ namespace System.Data.Common { return Fill (dataTable, command.ExecuteReader (commandBehavior)); } +#if NET_1_2 + [MonoTODO] + public int Fill (int startRecord, int maxRecords, DataTable[] dataTables) + { + throw new NotImplementedException (); + } +#endif + public int Fill (DataSet dataSet, int startRecord, int maxRecords, string srcTable) { return this.Fill (dataSet, startRecord, maxRecords, srcTable, SelectCommand, CommandBehavior.Default); } +#if NET_1_2 + [MonoTODO] + protected virtual int Fill (DataTable[] dataTables, int startRecord, int maxRecords, IDbCommand command, CommandBehavior behavior) + { + throw new NotImplementedException (); + } +#endif + +#if NET_1_2 + protected override int Fill (DataSet dataSet, string srcTable, IDataReader dataReader, int startRecord, int maxRecords) +#else protected virtual int Fill (DataSet dataSet, string srcTable, IDataReader dataReader, int startRecord, int maxRecords) +#endif { if (startRecord < 0) throw new ArgumentException ("The startRecord parameter was less than 0."); @@ -359,6 +448,20 @@ namespace System.Data.Common { return (DataTable[]) output.ToArray (typeof (DataTable)); } +#if NET_1_2 + [MonoTODO] + public DataSet GetDataSet () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DataTable GetDataTable () + { + throw new NotImplementedException (); + } +#endif + private string SetupSchema (SchemaType schemaType, string sourceTableName) { DataTableMapping tableMapping = null; @@ -635,11 +738,13 @@ namespace System.Data.Common { return Update (dataTable, tableMapping); } +#if ONLY_1_0 || ONLY_1_1 protected virtual void OnFillError (FillErrorEventArgs value) { if (FillError != null) FillError (this, value); } +#endif protected abstract void OnRowUpdated (RowUpdatedEventArgs value); protected abstract void OnRowUpdating (RowUpdatingEventArgs value); diff --git a/mcs/class/System.Data/System.Data.Common/DbDataPermission.cs b/mcs/class/System.Data/System.Data.Common/DbDataPermission.cs index 0d157b60e6c..963503068b0 100644 --- a/mcs/class/System.Data/System.Data.Common/DbDataPermission.cs +++ b/mcs/class/System.Data/System.Data.Common/DbDataPermission.cs @@ -6,9 +6,10 @@ // Tim Coleman (tim@timcoleman.com) // // (C) Ximian, Inc -// Copyright (C) Tim Coleman, 2002 +// Copyright (C) Tim Coleman, 2002-2003 // +using System.Data; using System.Security; using System.Security.Permissions; @@ -25,16 +26,29 @@ namespace System.Data.Common { #region Constructors +#if NET_1_2 + [Obsolete ("use DBDataPermission (PermissionState.None)", true)] +#endif protected DBDataPermission () : this (PermissionState.None, false) { } +#if NET_1_2 + [MonoTODO] + protected DBDataPermission (DbConnectionString constr) + { + } +#endif + protected DBDataPermission (PermissionState state) : this (state, false) { } +#if NET_1_2 + [Obsolete ("use DBDataPermission (PermissionState.None)", true)] +#endif public DBDataPermission (PermissionState state, bool allowBlankPassword) { this.state = state; @@ -59,6 +73,22 @@ namespace System.Data.Common { #region Methods +#if NET_1_1 + [MonoTODO] + public virtual void Add (string connectionString, string restrictions, KeyRestrictionBehavior behavior) + { + throw new NotImplementedException (); + } +#endif + +#if NET_1_2 + [MonoTODO] + protected void AddConnectionString (DbConnectionString constr) + { + throw new NotImplementedException (); + } +#endif + public override IPermission Copy () { DBDataPermission copy = CreateInstance (); @@ -95,6 +125,20 @@ namespace System.Data.Common { return (state == PermissionState.Unrestricted); } +#if NET_1_2 + [MonoTODO] + protected void SetConnectionString (DbConnectionString constr) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetRestriction (string connectionString, string restrictions, KeyRestrictionBehavior behavior) + { + throw new NotImplementedException (); + } +#endif + [MonoTODO] public override SecurityElement ToXml () { diff --git a/mcs/class/System.Data/System.Data.Common/DbDataPermissionAttribute.cs b/mcs/class/System.Data/System.Data.Common/DbDataPermissionAttribute.cs index 02cff942be6..e88b6282010 100644 --- a/mcs/class/System.Data/System.Data.Common/DbDataPermissionAttribute.cs +++ b/mcs/class/System.Data/System.Data.Common/DbDataPermissionAttribute.cs @@ -43,5 +43,21 @@ namespace System.Data.Common { } #endregion // Properties + + #region // Methods +#if NET_1_2 + [MonoTODO] + public bool ShouldSerializeConnectionString () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public bool ShouldSerializeKeyRestrictions () + { + throw new NotImplementedException (); + } +#endif + #endregion // Methods } } diff --git a/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs b/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs index dc08440e08d..e7803a7daa3 100644 --- a/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs +++ b/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs @@ -4,7 +4,7 @@ // Author: // Tim Coleman (tim@timcoleman.com) // -// Copyright (C) Tim Coleman, 2002 +// Copyright (C) Tim Coleman, 2002-2003 // using System.Collections; @@ -25,6 +25,18 @@ namespace System.Data.Common { #region Constructors +#if NET_1_2 + [MonoTODO] + public DbDataRecord (object[] values, PropertyDescriptorCollection descriptors, FieldNameLookup fieldNameLookup) + { + } + + [MonoTODO] + public DbDataRecord (SchemaInfo[] schemaInfo, object[] values, PropertyDescriptorCollection descriptors, FieldNameLookup fieldNameLookup) + { + } +#endif + internal DbDataRecord (SchemaInfo[] schema, object[] values, FieldNameLookup lookup) { this.schema = schema; @@ -142,6 +154,14 @@ namespace System.Data.Common { return (string) lookup [i]; } +#if NET_1_2 + [MonoTODO] + public virtual object GetObjectRef (int i) + { + throw new NotImplementedException (); + } +#endif + public int GetOrdinal (string name) { return lookup.IndexOf (name); @@ -269,6 +289,17 @@ namespace System.Data.Common { { return GetValue (i) == null; } +#if NET_1_2 + public virtual bool IsSetAsDefault (int i) + { + throw new NotImplementedException (); + } + + public void SetSchemaInfo (SchemaInfo[] schemaInfo) + { + throw new NotImplementedException (); + } +#endif #endregion // Methods } diff --git a/mcs/class/System.Data/System.Data.Common/DbDataSourceEnumerator.cs b/mcs/class/System.Data/System.Data.Common/DbDataSourceEnumerator.cs new file mode 100644 index 00000000000..a9a593dce56 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbDataSourceEnumerator.cs @@ -0,0 +1,32 @@ +// +// System.Data.Common.DbDataSourceEnumerator.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public abstract class DbDataSourceEnumerator + { + #region Constructors + + [MonoTODO] + protected DbDataSourceEnumerator () + { + } + + #endregion // Constructors + + #region Methods + + public abstract DataTable GetDataSources (); + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbDataUpdatableRecord.cs b/mcs/class/System.Data/System.Data.Common/DbDataUpdatableRecord.cs new file mode 100644 index 00000000000..c61a90b23e4 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbDataUpdatableRecord.cs @@ -0,0 +1,378 @@ +// +// System.Data.Common.DbDataUpdatableRecord.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.ComponentModel; + +namespace System.Data.Common { + public class DbDataUpdatableRecord : IDataUpdatableRecord, IDataRecord, ISetTypedData, ICustomTypeDescriptor, IGetTypedData + { + #region Properties + + [MonoTODO] + public virtual int FieldCount { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public virtual object this [string x] { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public virtual object this [int x] { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public virtual bool Updatable { + get { throw new NotImplementedException (); } + } + + #endregion // Properties + + #region Methods + + + [MonoTODO] + public virtual bool GetBoolean (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual byte GetByte (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual long GetBytes (int i, long dataIndex, byte[] buffer, int bufferIndex, int length) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual char GetChar (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual long GetChars (int i, long dataIndex, char[] buffer, int bufferIndex, int length) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual IDataReader GetData (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual string GetDataTypeName (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DateTime GetDateTime (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual decimal GetDecimal (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual double GetDouble (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual Type GetFieldType (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual float GetFloat (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual Guid GetGuid (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual short GetInt16 (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual int GetInt32 (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual long GetInt64 (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual string GetName (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual object GetObjectRef (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual int GetOrdinal (string name) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual string GetString (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual object GetValue (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual int GetValues (object[] values) + { + throw new NotImplementedException (); + } + + [MonoTODO] + AttributeCollection ICustomTypeDescriptor.GetAttributes () + { + throw new NotImplementedException (); + } + + [MonoTODO] + string ICustomTypeDescriptor.GetClassName () + { + throw new NotImplementedException (); + } + + [MonoTODO] + string ICustomTypeDescriptor.GetComponentName () + { + throw new NotImplementedException (); + } + + [MonoTODO] + TypeConverter ICustomTypeDescriptor.GetConverter () + { + throw new NotImplementedException (); + } + + [MonoTODO] + EventDescriptor ICustomTypeDescriptor.GetDefaultEvent () + { + throw new NotImplementedException (); + } + + [MonoTODO] + PropertyDescriptor ICustomTypeDescriptor.GetDefaultProperty () + { + throw new NotImplementedException (); + } + + [MonoTODO] + object ICustomTypeDescriptor.GetEditor (Type editorBaseType) + { + throw new NotImplementedException (); + } + + [MonoTODO] + EventDescriptorCollection ICustomTypeDescriptor.GetEvents () + { + throw new NotImplementedException (); + } + + [MonoTODO] + EventDescriptorCollection ICustomTypeDescriptor.GetEvents (Attribute[] attributes) + { + throw new NotImplementedException (); + } + + [MonoTODO] + PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties () + { + throw new NotImplementedException (); + } + + [MonoTODO] + PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties (Attribute[] attributes) + { + throw new NotImplementedException (); + } + + [MonoTODO] + object ICustomTypeDescriptor.GetPropertyOwner (PropertyDescriptor pd) + { + throw new NotImplementedException (); + } + + [MonoTODO] + int IDataUpdatableRecord.SetValues (object[] values) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual bool IsDBNull (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual bool IsSetAsDefault (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetBoolean (int i, bool value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetByte (int i, byte value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetBytes (int i, long dataIndex, byte[] buffer, int bufferIndex, int length) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetChar (int i, char value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetChars (int i, long dataIndex, char[] buffer, int bufferIndex, int length) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetDateTime (int i, DateTime value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetDecimal (int i, decimal value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetDefault (int i) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetDouble (int i, double value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetFloat (int i, float value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetGuid (int i, Guid value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetInt16 (int i, short value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetInt32 (int i, int value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetInt64 (int i, long value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetObjectRef (int i, object o) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetString (int i, string value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual void SetValue (int i, object value) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual int SetValues (int i, object[] value) + { + throw new NotImplementedException (); + } + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbParameter.cs b/mcs/class/System.Data/System.Data.Common/DbParameter.cs new file mode 100644 index 00000000000..46de6f82e03 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbParameter.cs @@ -0,0 +1,49 @@ +// +// System.Data.Common.DbParameter.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public abstract class DbParameter : MarshalByRefObject, IDbDataParameter, IDataParameter + { + #region Constructors + + [MonoTODO] + protected DbParameter () + { + } + + #endregion // Constructors + + #region Properties + + public abstract DbType DbType { get; set; } + public abstract ParameterDirection Direction { get; set; } + public abstract bool IsNullable { get; set; } + public abstract int Offset { get; set; } + public abstract string ParameterName { get; set; } + public abstract byte Precision { get; set; } + public abstract byte Scale { get; set; } + public abstract int Size { get; set; } + public abstract string SourceColumn { get; set; } + public abstract DataRowVersion SourceVersion { get; set; } + public abstract object Value { get; set; } + + #endregion // Properties + + #region Methods + + public abstract void CopyTo (DbParameter destination); + public abstract void ResetDbType (); + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs b/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs new file mode 100644 index 00000000000..b54f6aae2fd --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs @@ -0,0 +1,84 @@ +// +// System.Data.Common.DbParameterCollection.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.Collections; +using System.Runtime.InteropServices; + +namespace System.Data.Common { + public abstract class DbParameterCollection : MarshalByRefObject, IDataParameterCollection, IList, ICollection, IEnumerable + { + #region Constructors + + [MonoTODO] + protected DbParameterCollection () + { + } + + #endregion // Constructors + + #region Properties + + public abstract int Count { get; } + + object IDataParameterCollection.this [string parameterName] { + get { return this [parameterName]; } + set { this [parameterName] = (DbParameter) value; } + } + + object IList.this [int objA] { + get { return this [objA]; } + set { this [objA] = (DbParameter) value; } + } + + public abstract bool IsFixedSize { get; } + public abstract bool IsReadOnly { get; } + public abstract bool IsSynchronized { get; } + + [MonoTODO] + public DbParameter this [string ulAdd] { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DbParameter this [[Optional] int ulAdd] { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public abstract object SyncRoot { get; } + + #endregion // Properties + + #region Methods + + public abstract int Add (object value); + public abstract void AddRange (Array values); + protected abstract int CheckName (string parameterName); + public abstract void Clear (); + public abstract bool Contains (object value); + public abstract bool Contains (string value); + public abstract void CopyTo (Array ar, int index); + public abstract IEnumerator GetEnumerator (); + protected abstract DbParameter GetParameter (int index); + public abstract int IndexOf (object value); + public abstract int IndexOf (string parameterName); + public abstract void Insert (int index, object value); + public abstract void Remove (object value); + public abstract void RemoveAt (int index); + public abstract void RemoveAt (string parameterName); + protected abstract void SetParameter (int index, DbParameter value); + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderConfigurationHandler.cs b/mcs/class/System.Data/System.Data.Common/DbProviderConfigurationHandler.cs new file mode 100644 index 00000000000..637c4ce987d --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbProviderConfigurationHandler.cs @@ -0,0 +1,39 @@ +// +// System.Data.Common.DbProviderConfigurationHandler.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.Configuration; +using System.Xml; + +namespace System.Data.Common { + public class DbProviderConfigurationHandler : IConfigurationSectionHandler + { + #region Constructors + + [MonoTODO] + public DbProviderConfigurationHandler () + { + } + + #endregion // Constructors + + #region Methods + + [MonoTODO] + public virtual object Create (object parent, object configContext, XmlNode section) + { + throw new NotImplementedException (); + } + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs b/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs new file mode 100644 index 00000000000..0964c5b2957 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs @@ -0,0 +1,41 @@ +// +// System.Data.Common.DbProviderFactories.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.Collections; + +namespace System.Data.Common { + public sealed class DbProviderFactories + { + #region Methods + + [MonoTODO] + public static DbProviderFactory GetFactory (DataRow providerRow) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static DbProviderFactory GetFactory (string providerInvariantName) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static DataTable GetFactoryClasses () + { + throw new NotImplementedException (); + } + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderFactoriesConfigurationHandler.cs b/mcs/class/System.Data/System.Data.Common/DbProviderFactoriesConfigurationHandler.cs new file mode 100644 index 00000000000..89a4d98cc3a --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbProviderFactoriesConfigurationHandler.cs @@ -0,0 +1,39 @@ +// +// System.Data.Common.DbProviderFactoriesConfigurationHandler.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.Configuration; +using System.Xml; + +namespace System.Data.Common { + public class DbProviderFactoriesConfigurationHandler : IConfigurationSectionHandler + { + #region Constructors + + [MonoTODO] + public DbProviderFactoriesConfigurationHandler () + { + } + + #endregion // Constructors + + #region Methods + + [MonoTODO] + public virtual object Create (object parent, object configContext, XmlNode section) + { + throw new NotImplementedException (); + } + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderFactory.cs b/mcs/class/System.Data/System.Data.Common/DbProviderFactory.cs new file mode 100644 index 00000000000..19a566580bc --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbProviderFactory.cs @@ -0,0 +1,98 @@ +// +// System.Data.Common.DbProviderFactory.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.Collections; +using System.Security; +using System.Security.Permissions; + +namespace System.Data.Common { + public abstract class DbProviderFactory + { + #region Constructors + + [MonoTODO] + protected DbProviderFactory (DbProviderSupportedClasses supportedClasses) + { + } + + #endregion // Constructors + + #region Properties + + [MonoTODO] + public DbProviderSupportedClasses SupportedClasses { + get { throw new NotImplementedException (); } + } + + #endregion // Properties + + #region Methods + + [MonoTODO] + public virtual DbCommand CreateCommand () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DbCommandBuilder CreateCommandBuilder () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DbCommandSet BuildCommandSet () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DbConnection CreateConnection () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DbDataAdapter CreateDataAdapter () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DbDataSourceEnumerator CreateDataSourceEnumerator () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DbTable CreateDbTable () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual DbParameter CreateParameter () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public virtual CodeAccessPermission CreatePermission (PermissionState state) + { + throw new NotImplementedException (); + } + + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs b/mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs new file mode 100644 index 00000000000..1e3968820c6 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs @@ -0,0 +1,28 @@ +// +// System.Data.Common.DbProviderSupportedClasses.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public enum DbProviderSupportedClasses + { + CodeAccessPermission, + DbCommand, + DbCommandBuilder, + DbCommandSet, + DbConnection, + DbDataAdapter, + DbDataSourceEnumerator, + DbParameter, + DbTable, + None + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/DbTable.cs b/mcs/class/System.Data/System.Data.Common/DbTable.cs new file mode 100644 index 00000000000..d0b2feceef0 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbTable.cs @@ -0,0 +1,221 @@ +// +// System.Data.Common.DbTable.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +using System.ComponentModel; + +namespace System.Data.Common { + public abstract class DbTable : DataTable + { + #region Constructors + + [MonoTODO] + protected DbTable (DbProviderFactory providerFactory) + { + } + + #endregion // Constructors + + #region Properties + + [MonoTODO] + public ConflictOptions ConflictDetection { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DbConnection Connection { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DbCommand DeleteCommand { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DbCommand InsertCommand { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DbProviderFactory ProviderFactory { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public bool ReturnProviderSpecificTypes { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DbCommand SelectCommand { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public override ISite Site { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DataTableMapping TableMapping { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public int UpdateBatchSize { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + [MonoTODO] + public DbCommand UpdateCommand { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + #endregion // Properties + + #region Methods + + [MonoTODO] + public DataRelation AddChildTable (string relationName, DbTable childTable, string parentColumnName, string childColumnName) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public DataRelation AddChildTable (string relationName, DbTable childTable, string[] parentColumnNames, string[] childColumnNames) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public override void BeginInit () + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual DbCommandBuilder CreateCommandBuilder (DbConnection connection) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected override void Dispose (bool disposing) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public override void EndInit () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int Fill (object[] parameterValues) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int Fill (FillOptions options, object[] parameterValues) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int Fill (FillOptions options, DbTransaction transaction, object[] parameterValues) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int FillPage (int startRecord, int maxRecords, object[] parameterValues) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int FillPage (int startRecord, int maxRecords, FillOptions options, object[] parameterValues) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int FillPage (int startRecord, int maxRecords, FillOptions options, DbTransaction transaction, object[] parameterValues) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual string GenerateQuery (DbCommandBuilder cmdBuilder) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual string GenerateQueryForHierarchy (DbCommandBuilder builder, DataTable[] tableList) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int Update () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int Update (UpdateOptions updateOptions) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int Update (UpdateOptions updateOptions, DbTransaction transaction) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int UpdateRows (DataRow[] dataRows) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int UpdateRows (DataRow[] dataRows, UpdateOptions updateOptions) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public int UpdateRows (DataRow[] dataRows, UpdateOptions updateOptions, DbTransaction transaction) + { + throw new NotImplementedException (); + } + + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/DbTransaction.cs b/mcs/class/System.Data/System.Data.Common/DbTransaction.cs new file mode 100644 index 00000000000..7dc0155fa5c --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/DbTransaction.cs @@ -0,0 +1,50 @@ +// +// System.Data.Common.DbTransaction.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public abstract class DbTransaction : MarshalByRefObject, IDbTransaction, IDisposable + { + #region Constructors + + [MonoTODO] + protected DbTransaction () + { + } + + #endregion // Constructors + + #region Properties + + public DbConnection Connection { + get { return DbConnection; } + } + + protected abstract DbConnection DbConnection { get; } + + IDbConnection IDbTransaction.Connection { + get { return (IDbConnection) Connection; } + } + + public abstract IsolationLevel IsolationLevel { get; } + + #endregion // Properties + + #region Methods + + public abstract void Commit (); + public abstract void Dispose (); + public abstract void Rollback (); + + #endregion // Methods + } +} + +#endif // NET_1_2 diff --git a/mcs/class/System.Data/System.Data.Common/FieldNameLookup.cs b/mcs/class/System.Data/System.Data.Common/FieldNameLookup.cs index 4a48e3055a7..5782bc82657 100644 --- a/mcs/class/System.Data/System.Data.Common/FieldNameLookup.cs +++ b/mcs/class/System.Data/System.Data.Common/FieldNameLookup.cs @@ -11,7 +11,12 @@ using System.Collections; using System.Data; namespace System.Data.Common { +#if NET_1_2 +// FIXME: Need to clean this up + public sealed class FieldNameLookup +#else internal sealed class FieldNameLookup : ICollection, IEnumerable +#endif { #region Fields @@ -86,10 +91,12 @@ namespace System.Data.Common { list.CopyTo (array, index); } +#if ONLY_1_0 || ONLY_1_1 IEnumerator IEnumerable.GetEnumerator () { return list.GetEnumerator (); } +#endif public int IndexOf (object value) { diff --git a/mcs/class/System.Data/System.Data.Common/GroupByBehavior.cs b/mcs/class/System.Data/System.Data.Common/GroupByBehavior.cs new file mode 100644 index 00000000000..e8490e9174a --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/GroupByBehavior.cs @@ -0,0 +1,23 @@ +// +// System.Data.Common.GroupByBehavior.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public enum GroupByBehavior + { + ExactMatch, + MustContainAll, + NotSupported, + Unknown, + Unrelated + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/IdentifierCase.cs b/mcs/class/System.Data/System.Data.Common/IdentifierCase.cs new file mode 100644 index 00000000000..fe901e9ed34 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/IdentifierCase.cs @@ -0,0 +1,21 @@ +// +// System.Data.Common.IdentifierCase.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public enum IdentifierCase + { + Insensitive, + Sensitive, + Unknown + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/SchemaInfo.cs b/mcs/class/System.Data/System.Data.Common/SchemaInfo.cs index 916c35ecdd2..30b6b38b3e2 100644 --- a/mcs/class/System.Data/System.Data.Common/SchemaInfo.cs +++ b/mcs/class/System.Data/System.Data.Common/SchemaInfo.cs @@ -10,7 +10,14 @@ using System; namespace System.Data.Common { +#if NET_1_2 +// FIXME: This needs to be cleaned up to be compatible with both versions. +// Unfortunately, the SchemaInfo class we made is different from the MS +// version which is now public. + public class SchemaInfo +#else internal class SchemaInfo +#endif { #region Fields diff --git a/mcs/class/System.Data/System.Data.Common/SchemaLocation.cs b/mcs/class/System.Data/System.Data.Common/SchemaLocation.cs new file mode 100644 index 00000000000..d7bf68b5764 --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/SchemaLocation.cs @@ -0,0 +1,20 @@ +// +// System.Data.Common.SchemaLocation.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public enum SchemaLocation + { + DataTable, + SelectCommand + } +} + +#endif diff --git a/mcs/class/System.Data/System.Data.Common/SchemaTableColumn.cs b/mcs/class/System.Data/System.Data.Common/SchemaTableColumn.cs new file mode 100644 index 00000000000..218f4a9636a --- /dev/null +++ b/mcs/class/System.Data/System.Data.Common/SchemaTableColumn.cs @@ -0,0 +1,37 @@ +// +// System.Data.Common.SchemaTableColumn.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2003 +// + +#if NET_1_2 + +namespace System.Data.Common { + public sealed class SchemaTableColumn + { + #region Fields + public static readonly string AllowDBNull = "AllowDBNull"; + public static readonly string BaseColumnName = "BaseColumnName"; + public static readonly string BaseSchemaName = "BaseSchemaName"; + public static readonly string BaseTableName = "BaseTableName"; + public static readonly string ColumnName = "ColumnName"; + public static readonly string ColumnOrdinal = "ColumnOrdinal"; + public static readonly string ColumnSize = "ColumnSize"; + public static readonly string DataType = "DataType"; + public static readonly string IsAliased = "IsAliased"; + public static readonly string IsExpression = "IsExpression"; + public static readonly string IsKey = "IsKey"; + public static readonly string IsLong = "IsLong"; + public static readonly string IsUnique = "IsUnique"; + public static readonly string NumericPrecision = "NumericPrecision"; + public static readonly string NumericScale = "NumericScale"; + public static readonly string ProviderType = "ProviderType"; + + #endregion // Fields + } +} + +#endif // NET_1_2 |