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:
authorSureshkumar T <suresh@mono-cvs.ximian.com>2005-02-02 13:36:06 +0300
committerSureshkumar T <suresh@mono-cvs.ximian.com>2005-02-02 13:36:06 +0300
commit7ad878f3ee28a60851f4a1ea6227cfa74cc8b321 (patch)
treef356cd3e2d86a19cd5d0f6f627085dcf6d0266de /mcs/class/System.Data/System.Data.ProviderBase
parentf40c3259295bc21fe3ba6455893724938edb9848 (diff)
In System.Data.ProviderBase:
2005-02-02 Sureshkumar T <tsureshkumar@novell.com> * DbConnectionBase.cs: Implement Dispose Pattern In System.Data.Common: 2005-02-02 Sureshkumar T <tsureshkumar@novell.com> * DbConnection.cs: Implement Dispose pattern. svn path=/trunk/mcs/; revision=39973
Diffstat (limited to 'mcs/class/System.Data/System.Data.ProviderBase')
-rwxr-xr-xmcs/class/System.Data/System.Data.ProviderBase/ChangeLog4
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs13
2 files changed, 15 insertions, 2 deletions
diff --git a/mcs/class/System.Data/System.Data.ProviderBase/ChangeLog b/mcs/class/System.Data/System.Data.ProviderBase/ChangeLog
index a4926fb7407..88301fc8e76 100755
--- a/mcs/class/System.Data/System.Data.ProviderBase/ChangeLog
+++ b/mcs/class/System.Data/System.Data.ProviderBase/ChangeLog
@@ -1,3 +1,7 @@
+2005-02-02 Sureshkumar T <tsureshkumar@novell.com>
+
+ * DbConnectionBase.cs: Implement Dispose Pattern
+
2004-11-24 Sureshkumar T <tsureshkumar@novell.com>
* DbParameterCollectionBase.cs: Class name changed according to
diff --git a/mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs b/mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs
index 62b413bd99b..377432bb4e5 100644
--- a/mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs
+++ b/mcs/class/System.Data/System.Data.ProviderBase/DbConnectionBase.cs
@@ -43,6 +43,7 @@ namespace System.Data.ProviderBase {
DbConnectionFactory connectionFactory;
DbConnectionString connectionOptions;
string connectionString;
+ bool disposed = false;
#endregion // Fields
@@ -157,10 +158,18 @@ namespace System.Data.ProviderBase {
return (DbCommand) ConnectionFactory.ProviderFactory.CreateCommand ();
}
- [MonoTODO]
protected override void Dispose (bool disposing)
{
- throw new NotImplementedException ();
+ if (!disposed) {
+ try {
+ if (disposing) {
+ // do necessary clean up
+ }
+ disposed = true;
+ } finally {
+ base.Dispose (disposing);
+ }
+ }
}
[MonoTODO]