Author: suresh
Date: 2005-03-11 02:36:58 -0500 (Fri, 11 Mar 2005)
New Revision: 41679
Modified:
trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog
trunk/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase/ChangeLog
trunk/mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs
Log:
In System.Data.ProviderBase:
2005-03-11 Sureshkumar T <[EMAIL PROTECTED]>
* DbConnectionBase.cs : Implemented OnStateChange.
In System.Data.Odbc:
NET_2_0 uses base class's OnStateChange handler.
Modified: trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog 2005-03-11
07:25:22 UTC (rev 41678)
+++ trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog 2005-03-11
07:36:58 UTC (rev 41679)
@@ -1,7 +1,8 @@
2005-03-11 Sureshkumar T <[EMAIL PROTECTED]>
* OdbcConnection.cs : notify state change through event. clean up
- handles in case any exception while opening a connection.
+ handles in case any exception while opening a connection. NET_2_0
+ uses base class's OnStateChange handler.
2005-03-10 Sureshkumar T <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs
2005-03-11 07:25:22 UTC (rev 41678)
+++ trunk/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs
2005-03-11 07:36:58 UTC (rev 41679)
@@ -257,7 +257,7 @@
transaction = null;
- RaiseEventStateChange (ConnectionState.Open,
ConnectionState.Closed);
+ OnStateChange (ConnectionState.Open,
ConnectionState.Closed);
}
}
@@ -372,7 +372,7 @@
throw new OdbcException(new
OdbcError("SQLDriverConnect",OdbcHandleType.Dbc,hdbc));
}
- RaiseEventStateChange (ConnectionState.Closed,
ConnectionState.Open);
+ OnStateChange (ConnectionState.Closed,
ConnectionState.Open);
} catch (Exception) {
// free handles if any.
FreeHandles ();
@@ -433,12 +433,13 @@
return System.Text.Encoding.Default.GetString (buffer);
}
-
- private void RaiseEventStateChange (ConnectionState from,
ConnectionState to)
+#if ONLY_1_1
+ private void OnStateChange (ConnectionState from,
ConnectionState to)
{
if (StateChange != null)
StateChange (this, new StateChangeEventArgs
(from, to));
}
+#endif // ONLY_1_1
#endregion
Modified: trunk/mcs/class/System.Data/System.Data.ProviderBase/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.ProviderBase/ChangeLog
2005-03-11 07:25:22 UTC (rev 41678)
+++ trunk/mcs/class/System.Data/System.Data.ProviderBase/ChangeLog
2005-03-11 07:36:58 UTC (rev 41679)
@@ -1,3 +1,7 @@
+2005-03-11 Sureshkumar T <[EMAIL PROTECTED]>
+
+ * DbConnectionBase.cs : Implemented OnStateChange.
+
2005-03-08 Sureshkumar T <[EMAIL PROTECTED]>
* DbParameterBase.cs: Implemented most of get set methods.
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs
2005-03-11 07:25:22 UTC (rev 41678)
+++ trunk/mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs
2005-03-11 07:36:58 UTC (rev 41679)
@@ -191,10 +191,10 @@
throw new NotImplementedException ();
}
- [MonoTODO]
protected void OnStateChange (ConnectionState originalState,
ConnectionState currentState)
{
- throw new NotImplementedException ();
+ if (StateChange != null)
+ StateChange (this, new StateChangeEventArgs
(originalState, currentState));
}
[MonoTODO]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches