Browse Source

Add MONO_PARTIAL_DATA_IMPORT.

It is to make it possible to import everything but SqlClient and co.
Atsushi Eno 10 years ago
parent
commit
1eb8ff5fa3

+ 1 - 1
mcs/class/referencesource/System.Data/System/Data/Common/AdapterUtil.cs

@@ -1888,7 +1888,7 @@ namespace System.Data.Common {
         }
 
         static internal bool NeedManualEnlistment() {
-#if !MOBILE
+#if !MOBILE && !MONO_PARTIAL_DATA_IMPORT
             // We need to force a manual enlistment of transactions for ODBC and
             // OLEDB whenever the current SysTx transaction != the SysTx transaction
             // on the EnterpriseServices ContextUtil, or when ES.ContextUtil is

+ 4 - 0
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionInternal.cs

@@ -467,6 +467,9 @@ namespace System.Data.ProviderBase {
                                 SetInStasis();                           
                             }
                             else {
+#if MONO_PARTIAL_DATA_IMPORT
+				Dispose();
+#else
 #if !MOBILE
                                 PerformanceCounters.NumberOfNonPooledConnections.Decrement();
 #endif
@@ -474,6 +477,7 @@ namespace System.Data.ProviderBase {
                                 {
                                     Dispose();
                                 }
+#endif
                             }
                         }
                     }