projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6e52bee
)
Add #if-s for mobile builds.
author
Atsushi Eno
<atsushieno@gmail.com>
Wed, 18 Mar 2015 07:58:38 +0000
(15:58 +0800)
committer
Marek Safar
<marek.safar@gmail.com>
Mon, 2 May 2016 22:08:06 +0000
(
00:08
+0200)
15 files changed:
mcs/class/referencesource/System.Data/System/Data/Common/AdapterUtil.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/Common/NativeMethods.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/Common/System.Data_BID.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/Common/UnsafeNativeMethods.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/DataSet.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionFactory.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionHelper.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionInternal.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolGroup.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/SQLTypes/SQLFileStream.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/SqlClient/LocalDBAPI.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnection.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnectionFactory.cs
patch
|
blob
|
history
mcs/class/referencesource/System.Data/System/Data/SqlClient/TdsParserStaticMethods.cs
patch
|
blob
|
history
diff --git
a/mcs/class/referencesource/System.Data/System/Data/Common/AdapterUtil.cs
b/mcs/class/referencesource/System.Data/System/Data/Common/AdapterUtil.cs
index 71092075d227694f12a3b1b21c6ca70412849015..bdd182d74424d6de44014f04c0711355decd0d46 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/Common/AdapterUtil.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/Common/AdapterUtil.cs
@@
-18,8
+18,8
@@
namespace System.Data.Common {
using System.Data.ProviderBase;
#if !MOBILE
using System.Data.Odbc;
using System.Data.ProviderBase;
#if !MOBILE
using System.Data.Odbc;
-#endif
using System.Data.OleDb;
using System.Data.OleDb;
+#endif
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Diagnostics;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Diagnostics;
@@
-2111,7
+2111,11
@@
namespace System.Data.Common {
FileIOPermission.RevertAssert();
}
}
FileIOPermission.RevertAssert();
}
}
-#if !MOBILE
+#if MOBILE
+ static internal object LocalMachineRegistryValue(string subkey, string queryvalue) {
+ return null;
+ }
+#else
[ResourceExposure(ResourceScope.Machine)]
[ResourceConsumption(ResourceScope.Machine)]
static internal Stream GetXmlStreamFromValues(String[] values, String errorString) {
[ResourceExposure(ResourceScope.Machine)]
[ResourceConsumption(ResourceScope.Machine)]
static internal Stream GetXmlStreamFromValues(String[] values, String errorString) {
diff --git
a/mcs/class/referencesource/System.Data/System/Data/Common/NativeMethods.cs
b/mcs/class/referencesource/System.Data/System/Data/Common/NativeMethods.cs
index ba5eb1fc22051133619156af29d3c238d5469631..ebcf3fc72e4aed0ce11fc9e3f2a17989bdac8680 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/Common/NativeMethods.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/Common/NativeMethods.cs
@@
-15,6
+15,7
@@
namespace System.Data.Common {
internal static class NativeMethods {
internal static class NativeMethods {
+#if !NO_OLEDB
[Guid("0c733a1e-2a1c-11ce-ade5-00aa0044773d"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport]
internal interface ISourcesRowset {
[Guid("0c733a1e-2a1c-11ce-ade5-00aa0044773d"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport]
internal interface ISourcesRowset {
@@
-25,6
+26,7
@@
namespace System.Data.Common {
[In] IntPtr rgProperties,
[Out, MarshalAs(UnmanagedType.Interface)] out object ppRowset);
}
[In] IntPtr rgProperties,
[Out, MarshalAs(UnmanagedType.Interface)] out object ppRowset);
}
+#endif
[Guid("0C733A5E-2A1C-11CE-ADE5-00AA0044773D"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown), ComImport]
internal interface ITransactionJoin {
[Guid("0C733A5E-2A1C-11CE-ADE5-00AA0044773D"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown), ComImport]
internal interface ITransactionJoin {
diff --git
a/mcs/class/referencesource/System.Data/System/Data/Common/System.Data_BID.cs
b/mcs/class/referencesource/System.Data/System/Data/Common/System.Data_BID.cs
index 8cff81a5dc695d58a861e7ec8939ab451ad56b4e..c95844c82a82efbecd9aba0a91827f07157dfdc3 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/Common/System.Data_BID.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/Common/System.Data_BID.cs
@@
-290,7
+290,7
@@
internal static partial class Bid
}
}
}
}
-
+#if !NO_ODBC
//
// Manually edited wrappers
//
//
// Manually edited wrappers
//
@@
-311,7
+311,9
@@
internal static partial class Bid
if (((System.Data.Odbc.ODBC32.RetCode.SUCCESS != a1) || (modFlags & ApiGroup.StatusOk) != 0) && (modFlags & ApiGroup.Trace) != 0 && modID != NoData)
NativeMethods.Trace (modID, UIntPtr.Zero, UIntPtr.Zero, fmtPrintfW, (int)(short)a1, a2);
}
if (((System.Data.Odbc.ODBC32.RetCode.SUCCESS != a1) || (modFlags & ApiGroup.StatusOk) != 0) && (modFlags & ApiGroup.Trace) != 0 && modID != NoData)
NativeMethods.Trace (modID, UIntPtr.Zero, UIntPtr.Zero, fmtPrintfW, (int)(short)a1, a2);
}
+#endif
+#if !NO_OLEDB
[BidMethod]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
internal static void Trace(string fmtPrintfW, System.Data.OleDb.OleDbHResult a1) { //
[BidMethod]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
internal static void Trace(string fmtPrintfW, System.Data.OleDb.OleDbHResult a1) { //
@@
-336,7
+338,7
@@
internal static partial class Bid
if ((modFlags & ApiGroup.Trace) != 0 && modID != NoData)
NativeMethods.Trace (modID, UIntPtr.Zero, UIntPtr.Zero, fmtPrintfW, (int)a1,a2);
}
if ((modFlags & ApiGroup.Trace) != 0 && modID != NoData)
NativeMethods.Trace (modID, UIntPtr.Zero, UIntPtr.Zero, fmtPrintfW, (int)a1,a2);
}
-
+#endif
[BidMethod]
internal static void Trace(string fmtPrintfW, System.String a1, System.String a2) {
[BidMethod]
internal static void Trace(string fmtPrintfW, System.String a1, System.String a2) {
diff --git
a/mcs/class/referencesource/System.Data/System/Data/Common/UnsafeNativeMethods.cs
b/mcs/class/referencesource/System.Data/System/Data/Common/UnsafeNativeMethods.cs
index 47a1abb70c878194a8c05b2f30d31d190cc9782c..0c368cfcabed92023220f1af767d164ef6ee3192 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/Common/UnsafeNativeMethods.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/Common/UnsafeNativeMethods.cs
@@
-8,7
+8,9
@@
//------------------------------------------------------------------------------
using System;
//------------------------------------------------------------------------------
using System;
+#if !NO_ODBC
using System.Data.Odbc;
using System.Data.Odbc;
+#endif
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
@@
-22,6
+24,7
@@
namespace System.Data.Common {
[SuppressUnmanagedCodeSecurityAttribute()]
internal static class UnsafeNativeMethods {
[SuppressUnmanagedCodeSecurityAttribute()]
internal static class UnsafeNativeMethods {
+#if !NO_ODBC
//
// ODBC32
//
//
// ODBC32
//
@@
-462,7
+465,9
@@
namespace System.Data.Common {
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string TableType,
/*SQLSMALLINT*/Int16 NameLen4);
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string TableType,
/*SQLSMALLINT*/Int16 NameLen4);
+#endif
+#if !NO_OLEDB
//
// Oleaut32
//
//
// Oleaut32
//
@@
-1222,6
+1227,7
@@
namespace System.Data.Common {
IntPtr pUnkOuter,
ref Guid riid,
[MarshalAs(UnmanagedType.Interface)] ref object ppCommand);
IntPtr pUnkOuter,
ref Guid riid,
[MarshalAs(UnmanagedType.Interface)] ref object ppCommand);
+#endif
//
// Advapi32.dll Integrated security functions
//
// Advapi32.dll Integrated security functions
diff --git
a/mcs/class/referencesource/System.Data/System/Data/DataSet.cs
b/mcs/class/referencesource/System.Data/System/Data/DataSet.cs
index 504cdd268bba444611568abb32a7ae89b3f41cd5..cb0c072a6596823dda1c71424cf7f7567719a28b 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/DataSet.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/DataSet.cs
@@
-19,7
+19,9
@@
namespace System.Data {
using System.Collections.Specialized;
using System.Xml;
using System.Xml.Serialization;
using System.Collections.Specialized;
using System.Xml;
using System.Xml.Serialization;
+#if !NO_CONFIGURATION
using System.Xml.Serialization.Advanced;
using System.Xml.Serialization.Advanced;
+#endif
using System.Xml.Schema;
using System.Runtime.Serialization.Formatters.Binary; //Binary Formatter
using System.CodeDom;
using System.Xml.Schema;
using System.Runtime.Serialization.Formatters.Binary; //Binary Formatter
using System.CodeDom;
@@
-3309,6
+3311,7
@@
namespace System.Data {
private static bool PublishLegacyWSDL()
{
Single version = 1.0f; // Default is Version 1.0
private static bool PublishLegacyWSDL()
{
Single version = 1.0f; // Default is Version 1.0
+#if !NO_CONFIGURATION
NameValueCollection settings = (NameValueCollection)PrivilegedConfigurationManager.GetSection(Keywords.WS_DATASETFULLQNAME);
if (settings != null)
{
NameValueCollection settings = (NameValueCollection)PrivilegedConfigurationManager.GetSection(Keywords.WS_DATASETFULLQNAME);
if (settings != null)
{
@@
-3318,6
+3321,7
@@
namespace System.Data {
version = Single.Parse(values[0], CultureInfo.InvariantCulture);
}
}
version = Single.Parse(values[0], CultureInfo.InvariantCulture);
}
}
+#endif
return (version < 2.0f); // if config does not exist, Default is Version 1.0
}
return (version < 2.0f); // if config does not exist, Default is Version 1.0
}
@@
-3458,6
+3462,7
@@
namespace System.Data {
}
}
+#if !NO_CODEDOM
public class DataSetSchemaImporterExtension : SchemaImporterExtension {
// DataSetSchemaImporterExtension is used for WebServices, it is used to recognize the schema of DataSet within wsdl
// If a non 2.0 enabled DataSetSchemaImporterExtension, wsdl will generate a classes that you can't cast to dataset / datatable
public class DataSetSchemaImporterExtension : SchemaImporterExtension {
// DataSetSchemaImporterExtension is used for WebServices, it is used to recognize the schema of DataSet within wsdl
// If a non 2.0 enabled DataSetSchemaImporterExtension, wsdl will generate a classes that you can't cast to dataset / datatable
@@
-3664,4
+3669,5
@@
namespace System.Data {
return false;
}
}
return false;
}
}
+#endif
}
}
diff --git
a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionFactory.cs
b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionFactory.cs
index c9fe482c8b673be288b7d3c633ef6de266d9304a..6832381eb7c7078914760959de4a48b86b89a961 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionFactory.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionFactory.cs
@@
-131,7
+131,9
@@
namespace System.Data.ProviderBase {
DbConnectionInternal newConnection = CreateConnection(connectionOptions, poolKey, poolGroupProviderInfo, null, owningConnection, userOptions);
if (null != newConnection) {
DbConnectionInternal newConnection = CreateConnection(connectionOptions, poolKey, poolGroupProviderInfo, null, owningConnection, userOptions);
if (null != newConnection) {
+#if !MOBILE
PerformanceCounters.HardConnectsPerSecond.Increment();
PerformanceCounters.HardConnectsPerSecond.Increment();
+#endif
newConnection.MakeNonPooledObject(owningConnection, PerformanceCounters);
}
Bid.Trace("<prov.DbConnectionFactory.CreateNonPooledConnection|RES|CPOOL> %d#, Non-pooled database connection created.\n", ObjectID);
newConnection.MakeNonPooledObject(owningConnection, PerformanceCounters);
}
Bid.Trace("<prov.DbConnectionFactory.CreateNonPooledConnection|RES|CPOOL> %d#, Non-pooled database connection created.\n", ObjectID);
@@
-144,7
+146,9
@@
namespace System.Data.ProviderBase {
DbConnectionInternal newConnection = CreateConnection(options, poolKey, poolGroupProviderInfo, pool, owningObject, userOptions);
if (null != newConnection) {
DbConnectionInternal newConnection = CreateConnection(options, poolKey, poolGroupProviderInfo, pool, owningObject, userOptions);
if (null != newConnection) {
+#if !MOBILE
PerformanceCounters.HardConnectsPerSecond.Increment();
PerformanceCounters.HardConnectsPerSecond.Increment();
+#endif
newConnection.MakePooledConnection(pool);
}
Bid.Trace("<prov.DbConnectionFactory.CreatePooledConnection|RES|CPOOL> %d#, Pooled database connection created.\n", ObjectID);
newConnection.MakePooledConnection(pool);
}
Bid.Trace("<prov.DbConnectionFactory.CreatePooledConnection|RES|CPOOL> %d#, Pooled database connection created.\n", ObjectID);
@@
-277,7
+281,9
@@
namespace System.Data.ProviderBase {
}
else {
if (retry.TrySetResult(task.Result)) {
}
else {
if (retry.TrySetResult(task.Result)) {
+#if !MOBILE
PerformanceCounters.NumberOfNonPooledConnections.Increment();
PerformanceCounters.NumberOfNonPooledConnections.Increment();
+#endif
}
else {
// The outer TaskCompletionSource was already completed
}
else {
// The outer TaskCompletionSource was already completed
@@
-293,7
+299,9
@@
namespace System.Data.ProviderBase {
}
connection = CreateNonPooledConnection(owningConnection, poolGroup, userOptions);
}
connection = CreateNonPooledConnection(owningConnection, poolGroup, userOptions);
+#if !MOBILE
PerformanceCounters.NumberOfNonPooledConnections.Increment();
PerformanceCounters.NumberOfNonPooledConnections.Increment();
+#endif
}
else {
if (owningConnection.ForceNewConnection) {
}
else {
if (owningConnection.ForceNewConnection) {
@@
-425,7
+433,9
@@
namespace System.Data.ProviderBase {
// lock prevents race condition with PruneConnectionPoolGroups
newConnectionPoolGroups.Add(key, newConnectionPoolGroup);
// lock prevents race condition with PruneConnectionPoolGroups
newConnectionPoolGroups.Add(key, newConnectionPoolGroup);
+#if !MOBILE
PerformanceCounters.NumberOfActiveConnectionPoolGroups.Increment();
PerformanceCounters.NumberOfActiveConnectionPoolGroups.Increment();
+#endif
connectionPoolGroup = newConnectionPoolGroup;
_connectionPoolGroups = newConnectionPoolGroups;
}
connectionPoolGroup = newConnectionPoolGroup;
_connectionPoolGroups = newConnectionPoolGroups;
}
@@
-483,7
+493,9
@@
namespace System.Data.ProviderBase {
if (Bid.AdvancedOn) {
Bid.Trace("<prov.DbConnectionFactory.PruneConnectionPoolGroups|RES|INFO|CPOOL> %d#, ReleasePool=%d#\n", ObjectID, pool.ObjectID);
}
if (Bid.AdvancedOn) {
Bid.Trace("<prov.DbConnectionFactory.PruneConnectionPoolGroups|RES|INFO|CPOOL> %d#, ReleasePool=%d#\n", ObjectID, pool.ObjectID);
}
+#if !MOBILE
PerformanceCounters.NumberOfInactiveConnectionPools.Decrement();
PerformanceCounters.NumberOfInactiveConnectionPools.Decrement();
+#endif
}
}
}
}
}
}
@@
-505,7
+517,9
@@
namespace System.Data.ProviderBase {
if (Bid.AdvancedOn) {
Bid.Trace("<prov.DbConnectionFactory.PruneConnectionPoolGroups|RES|INFO|CPOOL> %d#, ReleasePoolGroup=%d#\n", ObjectID, poolGroup.ObjectID);
}
if (Bid.AdvancedOn) {
Bid.Trace("<prov.DbConnectionFactory.PruneConnectionPoolGroups|RES|INFO|CPOOL> %d#, ReleasePoolGroup=%d#\n", ObjectID, poolGroup.ObjectID);
}
+#if !MOBILE
PerformanceCounters.NumberOfInactiveConnectionPoolGroups.Decrement();
PerformanceCounters.NumberOfInactiveConnectionPoolGroups.Decrement();
+#endif
}
}
}
}
}
}
@@
-527,7
+541,9
@@
namespace System.Data.ProviderBase {
// move idle entries from last prune pass to a queue for pending release
// otherwise process entry which may move it from active to idle
if (entry.Value.Prune()) { // may add entries to _poolsToRelease
// move idle entries from last prune pass to a queue for pending release
// otherwise process entry which may move it from active to idle
if (entry.Value.Prune()) { // may add entries to _poolsToRelease
+#if !MOBILE
PerformanceCounters.NumberOfActiveConnectionPoolGroups.Decrement();
PerformanceCounters.NumberOfActiveConnectionPoolGroups.Decrement();
+#endif
QueuePoolGroupForRelease(entry.Value);
}
else {
QueuePoolGroupForRelease(entry.Value);
}
else {
@@
-556,7
+572,9
@@
namespace System.Data.ProviderBase {
}
_poolsToRelease.Add(pool);
}
}
_poolsToRelease.Add(pool);
}
+#if !MOBILE
PerformanceCounters.NumberOfInactiveConnectionPools.Increment();
PerformanceCounters.NumberOfInactiveConnectionPools.Increment();
+#endif
}
internal void QueuePoolGroupForRelease(DbConnectionPoolGroup poolGroup) {
}
internal void QueuePoolGroupForRelease(DbConnectionPoolGroup poolGroup) {
@@
-566,7
+584,9
@@
namespace System.Data.ProviderBase {
lock (_poolGroupsToRelease) {
_poolGroupsToRelease.Add(poolGroup);
}
lock (_poolGroupsToRelease) {
_poolGroupsToRelease.Add(poolGroup);
}
+#if !MOBILE
PerformanceCounters.NumberOfInactiveConnectionPoolGroups.Increment();
PerformanceCounters.NumberOfInactiveConnectionPoolGroups.Increment();
+#endif
}
virtual protected DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) {
}
virtual protected DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) {
diff --git
a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionHelper.cs
b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionHelper.cs
index 0e562288294d7ecaad7fe7122b0d9dc668a8a03f..8c09bbc4c0824f09a5544e4db94abecf78cb5e5a 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionHelper.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionHelper.cs
@@
-207,6
+207,7
@@
namespace NAMESPACE {
partial void RepairInnerConnection();
partial void RepairInnerConnection();
+#if !MOBILE
// NOTE: This is just a private helper because OracleClient V1.1 shipped
// with a different argument name and it's a breaking change to not use
// the same argument names in V2.0 (VB Named Parameter Binding--Ick)
// NOTE: This is just a private helper because OracleClient V1.1 shipped
// with a different argument name and it's a breaking change to not use
// the same argument names in V2.0 (VB Named Parameter Binding--Ick)
@@
-235,6
+236,7
@@
namespace NAMESPACE {
// we should consider a GC.KeepAlive(this) here.
GC.KeepAlive(this);
}
// we should consider a GC.KeepAlive(this) here.
GC.KeepAlive(this);
}
+#endif
override public void EnlistTransaction(SysTx.Transaction transaction) {
CONNECTIONOBJECTNAME.ExecutePermission.Demand();
override public void EnlistTransaction(SysTx.Transaction transaction) {
CONNECTIONOBJECTNAME.ExecutePermission.Demand();
diff --git
a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionInternal.cs
b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionInternal.cs
index 73541107c73d21db23747d5c99b149d1a9a25544..96a6729dd25969420d40e6a7ba541740cebb3071 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionInternal.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionInternal.cs
@@
-356,7
+356,9
@@
namespace System.Data.ProviderBase {
Activate(transaction);
Activate(transaction);
+#if !MOBILE
PerformanceCounters.NumberOfActiveConnections.Increment();
PerformanceCounters.NumberOfActiveConnections.Increment();
+#endif
}
internal void AddWeakReference(object value, int tag) {
}
internal void AddWeakReference(object value, int tag) {
@@
-448,7
+450,9
@@
namespace System.Data.ProviderBase {
else {
Deactivate(); // ensure we de-activate non-pooled connections, or the data readers and transactions may not get cleaned up...
else {
Deactivate(); // ensure we de-activate non-pooled connections, or the data readers and transactions may not get cleaned up...
+#if !MOBILE
PerformanceCounters.HardDisconnectsPerSecond.Increment();
PerformanceCounters.HardDisconnectsPerSecond.Increment();
+#endif
// To prevent an endless recursion, we need to clear
// the owning object before we call dispose so that
// To prevent an endless recursion, we need to clear
// the owning object before we call dispose so that
@@
-463,7
+467,9
@@
namespace System.Data.ProviderBase {
SetInStasis();
}
else {
SetInStasis();
}
else {
+#if !MOBILE
PerformanceCounters.NumberOfNonPooledConnections.Decrement();
PerformanceCounters.NumberOfNonPooledConnections.Decrement();
+#endif
if (this.GetType() != typeof(System.Data.SqlClient.SqlInternalConnectionSmi))
{
Dispose();
if (this.GetType() != typeof(System.Data.SqlClient.SqlInternalConnectionSmi))
{
Dispose();
@@
-513,9
+519,11
@@
namespace System.Data.ProviderBase {
Debug.Assert(0 == activateCount, "activated multiple times?");
#endif // DEBUG
Debug.Assert(0 == activateCount, "activated multiple times?");
#endif // DEBUG
+#if !MOBILE
if (PerformanceCounters != null) { // Pool.Clear will DestroyObject that will clean performanceCounters before going here
PerformanceCounters.NumberOfActiveConnections.Decrement();
}
if (PerformanceCounters != null) { // Pool.Clear will DestroyObject that will clean performanceCounters before going here
PerformanceCounters.NumberOfActiveConnections.Decrement();
}
+#endif
if (!_connectionIsDoomed && Pool.UseLoadBalancing) {
// If we're not already doomed, check the connection's lifetime and
if (!_connectionIsDoomed && Pool.UseLoadBalancing) {
// If we're not already doomed, check the connection's lifetime and
@@
-569,7
+577,9
@@
namespace System.Data.ProviderBase {
// once and for all, or the server will have fits about us
// leaving connections open until the client-side GC kicks
// in.
// once and for all, or the server will have fits about us
// leaving connections open until the client-side GC kicks
// in.
+#if !MOBILE
PerformanceCounters.NumberOfNonPooledConnections.Decrement();
PerformanceCounters.NumberOfNonPooledConnections.Decrement();
+#endif
Dispose();
}
// When _pooledCount is 0, the connection is a pooled connection
Dispose();
}
// When _pooledCount is 0, the connection is a pooled connection
@@
-839,7
+849,9
@@
namespace System.Data.ProviderBase {
internal void SetInStasis() {
_isInStasis = true;
Bid.PoolerTrace("<prov.DbConnectionInternal.SetInStasis|RES|CPOOL> %d#, Non-Pooled Connection has Delegated Transaction, waiting to Dispose.\n", ObjectID);
internal void SetInStasis() {
_isInStasis = true;
Bid.PoolerTrace("<prov.DbConnectionInternal.SetInStasis|RES|CPOOL> %d#, Non-Pooled Connection has Delegated Transaction, waiting to Dispose.\n", ObjectID);
+#if !MOBILE
PerformanceCounters.NumberOfStasisConnections.Increment();
PerformanceCounters.NumberOfStasisConnections.Increment();
+#endif
}
private void TerminateStasis(bool returningToPool) {
}
private void TerminateStasis(bool returningToPool) {
@@
-849,7
+861,9
@@
namespace System.Data.ProviderBase {
else {
Bid.PoolerTrace("<prov.DbConnectionInternal.TerminateStasis|RES|CPOOL> %d#, Delegated Transaction has ended, connection is closed/leaked. Disposing.\n", ObjectID);
}
else {
Bid.PoolerTrace("<prov.DbConnectionInternal.TerminateStasis|RES|CPOOL> %d#, Delegated Transaction has ended, connection is closed/leaked. Disposing.\n", ObjectID);
}
+#if !MOBILE
PerformanceCounters.NumberOfStasisConnections.Decrement();
PerformanceCounters.NumberOfStasisConnections.Decrement();
+#endif
_isInStasis = false;
}
_isInStasis = false;
}
diff --git
a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs
b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs
index a5b05119969f11d9bfb8d8f88ab79b26c800ff12..50ef20b0f8e0d2d1f74136baa642ca5a8fcb0291 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs
@@
-235,8
+235,9
@@
namespace System.Data.ProviderBase {
Bid.PoolerTrace("<prov.DbConnectionPool.TransactedConnectionPool.PutTransactedObject|RES|CPOOL> %d#, Transaction %d#, Connection %d#, Added.\n", ObjectID, transaction.GetHashCode(), transactedObject.ObjectID );
}
Bid.PoolerTrace("<prov.DbConnectionPool.TransactedConnectionPool.PutTransactedObject|RES|CPOOL> %d#, Transaction %d#, Connection %d#, Added.\n", ObjectID, transaction.GetHashCode(), transactedObject.ObjectID );
}
+#if !MOBILE
Pool.PerformanceCounters.NumberOfFreeConnections.Increment();
Pool.PerformanceCounters.NumberOfFreeConnections.Increment();
-
+#endif
}
internal void TransactionEnded(SysTx.Transaction transaction, DbConnectionInternal transactedObject)
}
internal void TransactionEnded(SysTx.Transaction transaction, DbConnectionInternal transactedObject)
@@
-300,7
+301,9
@@
namespace System.Data.ProviderBase {
// connections, we'll put it back...
if (0 <= entry)
{
// connections, we'll put it back...
if (0 <= entry)
{
+#if !MOBILE
Pool.PerformanceCounters.NumberOfFreeConnections.Decrement();
Pool.PerformanceCounters.NumberOfFreeConnections.Decrement();
+#endif
Pool.PutObjectFromTransactedPool(transactedObject);
}
}
Pool.PutObjectFromTransactedPool(transactedObject);
}
}
@@
-622,7
+625,9
@@
namespace System.Data.ProviderBase {
if (_stackOld.TryPop(out obj)) {
Debug.Assert(obj != null, "null connection is not expected");
// If we obtained one from the old stack, destroy it.
if (_stackOld.TryPop(out obj)) {
Debug.Assert(obj != null, "null connection is not expected");
// If we obtained one from the old stack, destroy it.
+#if !MOBILE
PerformanceCounters.NumberOfFreeConnections.Decrement();
PerformanceCounters.NumberOfFreeConnections.Decrement();
+#endif
// Transaction roots must survive even aging out (TxEnd event will clean them up).
bool shouldDestroy = true;
// Transaction roots must survive even aging out (TxEnd event will clean them up).
bool shouldDestroy = true;
@@
-709,12
+714,16
@@
namespace System.Data.ProviderBase {
// Second, dispose of all the free connections.
while (_stackNew.TryPop(out obj)) {
Debug.Assert(obj != null, "null connection is not expected");
// Second, dispose of all the free connections.
while (_stackNew.TryPop(out obj)) {
Debug.Assert(obj != null, "null connection is not expected");
+#if !MOBILE
PerformanceCounters.NumberOfFreeConnections.Decrement();
PerformanceCounters.NumberOfFreeConnections.Decrement();
+#endif
DestroyObject(obj);
}
while (_stackOld.TryPop(out obj)) {
Debug.Assert(obj != null, "null connection is not expected");
DestroyObject(obj);
}
while (_stackOld.TryPop(out obj)) {
Debug.Assert(obj != null, "null connection is not expected");
+#if !MOBILE
PerformanceCounters.NumberOfFreeConnections.Decrement();
PerformanceCounters.NumberOfFreeConnections.Decrement();
+#endif
DestroyObject(obj);
}
DestroyObject(obj);
}
@@
-748,7
+757,9
@@
namespace System.Data.ProviderBase {
}
_objectList.Add(newObj);
_totalObjects = _objectList.Count;
}
_objectList.Add(newObj);
_totalObjects = _objectList.Count;
+#if !MOBILE
PerformanceCounters.NumberOfPooledConnections.Increment(); //
PerformanceCounters.NumberOfPooledConnections.Increment(); //
+#endif
}
// If the old connection belonged to another pool, we need to remove it from that
}
// If the old connection belonged to another pool, we need to remove it from that
@@
-964,12
+975,16
@@
namespace System.Data.ProviderBase {
if (removed) {
Bid.PoolerTrace("<prov.DbConnectionPool.DestroyObject|RES|CPOOL> %d#, Connection %d#, Removed from pool.\n", ObjectID, obj.ObjectID);
if (removed) {
Bid.PoolerTrace("<prov.DbConnectionPool.DestroyObject|RES|CPOOL> %d#, Connection %d#, Removed from pool.\n", ObjectID, obj.ObjectID);
+#if !MOBILE
PerformanceCounters.NumberOfPooledConnections.Decrement();
PerformanceCounters.NumberOfPooledConnections.Decrement();
+#endif
}
obj.Dispose();
Bid.PoolerTrace("<prov.DbConnectionPool.DestroyObject|RES|CPOOL> %d#, Connection %d#, Disposed.\n", ObjectID, obj.ObjectID);
}
obj.Dispose();
Bid.PoolerTrace("<prov.DbConnectionPool.DestroyObject|RES|CPOOL> %d#, Connection %d#, Disposed.\n", ObjectID, obj.ObjectID);
+#if !MOBILE
PerformanceCounters.HardDisconnectsPerSecond.Increment();
PerformanceCounters.HardDisconnectsPerSecond.Increment();
+#endif
}
}
}
}
@@
-1159,7
+1174,9
@@
namespace System.Data.ProviderBase {
DbConnectionInternal obj = null;
SysTx.Transaction transaction = null;
DbConnectionInternal obj = null;
SysTx.Transaction transaction = null;
+#if !MOBILE
PerformanceCounters.SoftConnectsPerSecond.Increment();
PerformanceCounters.SoftConnectsPerSecond.Increment();
+#endif
Bid.PoolerTrace("<prov.DbConnectionPool.GetConnection|RES|CPOOL> %d#, Getting connection.\n", ObjectID);
Bid.PoolerTrace("<prov.DbConnectionPool.GetConnection|RES|CPOOL> %d#, Getting connection.\n", ObjectID);
@@
-1364,7
+1381,9
@@
namespace System.Data.ProviderBase {
/// <param name="oldConnection">Inner connection that will be replaced</param>
/// <returns>A new inner connection that is attached to the <paramref name="owningObject"/></returns>
internal DbConnectionInternal ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) {
/// <param name="oldConnection">Inner connection that will be replaced</param>
/// <returns>A new inner connection that is attached to the <paramref name="owningObject"/></returns>
internal DbConnectionInternal ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) {
+#if !MOBILE
PerformanceCounters.SoftConnectsPerSecond.Increment();
PerformanceCounters.SoftConnectsPerSecond.Increment();
+#endif
Bid.PoolerTrace("<prov.DbConnectionPool.ReplaceConnection|RES|CPOOL> %d#, replacing connection.\n", ObjectID);
DbConnectionInternal newConnection = UserCreateRequest(owningObject, userOptions, oldConnection);
Bid.PoolerTrace("<prov.DbConnectionPool.ReplaceConnection|RES|CPOOL> %d#, replacing connection.\n", ObjectID);
DbConnectionInternal newConnection = UserCreateRequest(owningObject, userOptions, oldConnection);
@@
-1402,7
+1421,9
@@
namespace System.Data.ProviderBase {
if (null != obj) {
Bid.PoolerTrace("<prov.DbConnectionPool.GetFromGeneralPool|RES|CPOOL> %d#, Connection %d#, Popped from general pool.\n", ObjectID, obj.ObjectID);
if (null != obj) {
Bid.PoolerTrace("<prov.DbConnectionPool.GetFromGeneralPool|RES|CPOOL> %d#, Connection %d#, Popped from general pool.\n", ObjectID, obj.ObjectID);
+#if !MOBILE
PerformanceCounters.NumberOfFreeConnections.Decrement();
PerformanceCounters.NumberOfFreeConnections.Decrement();
+#endif
}
return(obj);
}
}
return(obj);
}
@@
-1416,7
+1437,9
@@
namespace System.Data.ProviderBase {
if (null != obj) {
Bid.PoolerTrace("<prov.DbConnectionPool.GetFromTransactedPool|RES|CPOOL> %d#, Connection %d#, Popped from transacted pool.\n", ObjectID, obj.ObjectID);
if (null != obj) {
Bid.PoolerTrace("<prov.DbConnectionPool.GetFromTransactedPool|RES|CPOOL> %d#, Connection %d#, Popped from transacted pool.\n", ObjectID, obj.ObjectID);
+#if !MOBILE
PerformanceCounters.NumberOfFreeConnections.Decrement();
PerformanceCounters.NumberOfFreeConnections.Decrement();
+#endif
if (obj.IsTransactionRoot) {
try {
if (obj.IsTransactionRoot) {
try {
@@
-1560,14
+1583,17
@@
namespace System.Data.ProviderBase {
_stackNew.Push(obj);
_waitHandles.PoolSemaphore.Release(1);
_stackNew.Push(obj);
_waitHandles.PoolSemaphore.Release(1);
+#if !MOBILE
PerformanceCounters.NumberOfFreeConnections.Increment();
PerformanceCounters.NumberOfFreeConnections.Increment();
-
+#endif
}
internal void PutObject(DbConnectionInternal obj, object owningObject) {
Debug.Assert(null != obj, "null obj?");
}
internal void PutObject(DbConnectionInternal obj, object owningObject) {
Debug.Assert(null != obj, "null obj?");
+#if !MOBILE
PerformanceCounters.SoftDisconnectsPerSecond.Increment();
PerformanceCounters.SoftDisconnectsPerSecond.Increment();
+#endif
// Once a connection is closing (which is the state that we're in at
// this point in time) you cannot delegate a transaction to or enlist
// Once a connection is closing (which is the state that we're in at
// this point in time) you cannot delegate a transaction to or enlist
@@
-1671,7
+1697,9
@@
namespace System.Data.ProviderBase {
DbConnectionInternal obj = reclaimedObjects[i];
Bid.PoolerTrace("<prov.DbConnectionPool.ReclaimEmancipatedObjects|RES|CPOOL> %d#, Connection %d#, Reclaiming.\n", ObjectID, obj.ObjectID);
DbConnectionInternal obj = reclaimedObjects[i];
Bid.PoolerTrace("<prov.DbConnectionPool.ReclaimEmancipatedObjects|RES|CPOOL> %d#, Connection %d#, Reclaiming.\n", ObjectID, obj.ObjectID);
+#if !MOBILE
PerformanceCounters.NumberOfReclaimedConnections.Increment();
PerformanceCounters.NumberOfReclaimedConnections.Increment();
+#endif
emancipatedObjectFound = true;
emancipatedObjectFound = true;
diff --git
a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolGroup.cs
b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolGroup.cs
index 17fc317bbe7ace932d30a147e381ec8fc66e86a9..91fb7aacb908766942fb51509fb23c1c40b0e4d6 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolGroup.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolGroup.cs
@@
-145,7
+145,9
@@
namespace System.Data.ProviderBase {
DbConnectionFactory connectionFactory = pool.ConnectionFactory;
DbConnectionFactory connectionFactory = pool.ConnectionFactory;
+#if !MOBILE
connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Decrement();
connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Decrement();
+#endif
connectionFactory.QueuePoolForRelease(pool, true);
}
}
connectionFactory.QueuePoolForRelease(pool, true);
}
}
@@
-198,7
+200,9
@@
namespace System.Data.ProviderBase {
newPool.Startup(); // must start pool before usage
bool addResult = _poolCollection.TryAdd(currentIdentity, newPool);
Debug.Assert(addResult, "No other pool with current identity should exist at this point");
newPool.Startup(); // must start pool before usage
bool addResult = _poolCollection.TryAdd(currentIdentity, newPool);
Debug.Assert(addResult, "No other pool with current identity should exist at this point");
+#if !MOBILE
connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Increment();
connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Increment();
+#endif
pool = newPool;
newPool = null;
}
pool = newPool;
newPool = null;
}
@@
-275,7
+279,9
@@
namespace System.Data.ProviderBase {
// are completely empty.
DbConnectionFactory connectionFactory = pool.ConnectionFactory;
// are completely empty.
DbConnectionFactory connectionFactory = pool.ConnectionFactory;
+#if !MOBILE
connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Decrement();
connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Decrement();
+#endif
connectionFactory.QueuePoolForRelease(pool, false);
}
else {
connectionFactory.QueuePoolForRelease(pool, false);
}
else {
diff --git
a/mcs/class/referencesource/System.Data/System/Data/SQLTypes/SQLFileStream.cs
b/mcs/class/referencesource/System.Data/System/Data/SQLTypes/SQLFileStream.cs
index 3491985f95315577a85691991689ac7180dfcb52..05bb96edc14df350da3f1e542e3e64805d5576dc 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/SQLTypes/SQLFileStream.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/SQLTypes/SQLFileStream.cs
@@
-785,7
+785,11
@@
namespace System.Data.SqlTypes
bRevertAssert = true;
System.Diagnostics.Debug.Assert ( m_fs == null );
bRevertAssert = true;
System.Diagnostics.Debug.Assert ( m_fs == null );
+#if MOBILE
+ m_fs = new System.IO.FileStream ( hFile.DangerousGetHandle (), access, ( ( options & System.IO.FileOptions.Asynchronous ) != 0 ), DefaultBufferSize );
+#else
m_fs = new System.IO.FileStream ( hFile, access, DefaultBufferSize, ( ( options & System.IO.FileOptions.Asynchronous ) != 0 ) );
m_fs = new System.IO.FileStream ( hFile, access, DefaultBufferSize, ( ( options & System.IO.FileOptions.Asynchronous ) != 0 ) );
+#endif
}
finally
{
}
finally
{
diff --git
a/mcs/class/referencesource/System.Data/System/Data/SqlClient/LocalDBAPI.cs
b/mcs/class/referencesource/System.Data/System/Data/SqlClient/LocalDBAPI.cs
index f942a2d03dcb6ce5c7fe3dc6f453e148d6d4ade6..e29bda4cad505c6df106b29e11851d3f92068298 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/SqlClient/LocalDBAPI.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/SqlClient/LocalDBAPI.cs
@@
-304,6
+304,7
@@
namespace System.Data
if (s_configurableInstances == null)
{
Dictionary<string, InstanceInfo> tempConfigurableInstances = new Dictionary<string, InstanceInfo>(StringComparer.OrdinalIgnoreCase);
if (s_configurableInstances == null)
{
Dictionary<string, InstanceInfo> tempConfigurableInstances = new Dictionary<string, InstanceInfo>(StringComparer.OrdinalIgnoreCase);
+#if !NO_CONFIGURATION
object section = PrivilegedConfigurationManager.GetSection("system.data.localdb");
if (section != null) // if no section just skip creation
{
object section = PrivilegedConfigurationManager.GetSection("system.data.localdb");
if (section != null) // if no section just skip creation
{
@@
-318,6
+319,7
@@
namespace System.Data
}
}
else
}
}
else
+#endif
Bid.Trace( "<sc.LocalDBAPI.CreateLocalDBInstance> No system.data.localdb section found in configuration");
s_configurableInstances = tempConfigurableInstances;
}
Bid.Trace( "<sc.LocalDBAPI.CreateLocalDBInstance> No system.data.localdb section found in configuration");
s_configurableInstances = tempConfigurableInstances;
}
diff --git
a/mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnection.cs
b/mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnection.cs
index f5639c3f288c1dd1488eae9ae8a893a5af5c89e3..ac04c011fb54b0fbcded1fbb2058aae07f247275 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnection.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnection.cs
@@
-802,6
+802,7
@@
namespace System.Data.SqlClient
}
}
}
}
+#if !MOBILE
public void EnlistDistributedTransaction(System.EnterpriseServices.ITransaction transaction) {
if (IsContextConnection) {
throw SQL.NotAvailableOnContextConnection();
public void EnlistDistributedTransaction(System.EnterpriseServices.ITransaction transaction) {
if (IsContextConnection) {
throw SQL.NotAvailableOnContextConnection();
@@
-809,6
+810,7
@@
namespace System.Data.SqlClient
EnlistDistributedTransactionHelper(transaction);
}
EnlistDistributedTransactionHelper(transaction);
}
+#endif
override public void Open() {
IntPtr hscp;
override public void Open() {
IntPtr hscp;
diff --git
a/mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnectionFactory.cs
b/mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnectionFactory.cs
index 3b23e31a0462555186d4453a4bad238ef7008941..37766e5f465ac3d742bf4ab291f825231e7a7777 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnectionFactory.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/SqlClient/SqlConnectionFactory.cs
@@
-180,14
+180,16
@@
namespace System.Data.SqlClient
throw SQL.NotAvailableOnContextConnection();
}
throw SQL.NotAvailableOnContextConnection();
}
- NameValueCollection settings = (NameValueCollection)PrivilegedConfigurationManager.GetSection("system.data.sqlclient");
Stream XMLStream =null;
Stream XMLStream =null;
+#if !NO_CONFIGURATION
+ NameValueCollection settings = (NameValueCollection)PrivilegedConfigurationManager.GetSection("system.data.sqlclient");
if (settings != null){
string [] values = settings.GetValues(_metaDataXml);
if (values != null) {
XMLStream = ADP.GetXmlStreamFromValues(values, _metaDataXml);
}
}
if (settings != null){
string [] values = settings.GetValues(_metaDataXml);
if (values != null) {
XMLStream = ADP.GetXmlStreamFromValues(values, _metaDataXml);
}
}
+#endif
// if the xml was not obtained from machine.config use the embedded XML resource
if (XMLStream == null){
// if the xml was not obtained from machine.config use the embedded XML resource
if (XMLStream == null){
@@
-306,9
+308,11
@@
namespace System.Data.SqlClient
public static readonly SqlPerformanceCounters SingletonInstance = new SqlPerformanceCounters();
public static readonly SqlPerformanceCounters SingletonInstance = new SqlPerformanceCounters();
+#if !MOBILE
[System.Diagnostics.PerformanceCounterPermissionAttribute(System.Security.Permissions.SecurityAction.Assert, PermissionAccess=PerformanceCounterPermissionAccess.Write, MachineName=".", CategoryName=CategoryName)]
private SqlPerformanceCounters() : base (CategoryName, CategoryHelp) {
}
[System.Diagnostics.PerformanceCounterPermissionAttribute(System.Security.Permissions.SecurityAction.Assert, PermissionAccess=PerformanceCounterPermissionAccess.Write, MachineName=".", CategoryName=CategoryName)]
private SqlPerformanceCounters() : base (CategoryName, CategoryHelp) {
}
+#endif
}
}
}
}
diff --git
a/mcs/class/referencesource/System.Data/System/Data/SqlClient/TdsParserStaticMethods.cs
b/mcs/class/referencesource/System.Data/System/Data/SqlClient/TdsParserStaticMethods.cs
index 2f58d45a84cd1611b754b93f0402c5609058a580..3b85484e02cf477f64771cc887c392fb5ccda4ae 100644
(file)
--- a/
mcs/class/referencesource/System.Data/System/Data/SqlClient/TdsParserStaticMethods.cs
+++ b/
mcs/class/referencesource/System.Data/System/Data/SqlClient/TdsParserStaticMethods.cs
@@
-33,6
+33,7
@@
namespace System.Data.SqlClient {
[ResourceExposure(ResourceScope.None)]
[ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)]
static internal void AliasRegistryLookup(ref string host, ref string protocol) {
[ResourceExposure(ResourceScope.None)]
[ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)]
static internal void AliasRegistryLookup(ref string host, ref string protocol) {
+#if !MOBILE
if (!ADP.IsEmpty(host)) {
const String folder = "SOFTWARE\\Microsoft\\MSSQLServer\\Client\\ConnectTo";
// Put a try...catch... around this so we don't abort ANY connection if we can't read the registry.
if (!ADP.IsEmpty(host)) {
const String folder = "SOFTWARE\\Microsoft\\MSSQLServer\\Client\\ConnectTo";
// Put a try...catch... around this so we don't abort ANY connection if we can't read the registry.
@@
-87,6
+88,7
@@
namespace System.Data.SqlClient {
}
}
}
}
}
}
+#endif
}
// Encrypt password to be sent to SQL Server
}
// Encrypt password to be sent to SQL Server