Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,8 @@
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Sql\SqlDataSourceEnumerator.Windows.cs">
<Link>Microsoft\Data\Sql\SqlDataSourceEnumerator.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalDBAPI.Windows.cs">
<Link>Microsoft\Data\SqlClient\LocalDBAPI.Windows.cs</Link>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Windows.cs">
<Link>Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlColumnEncryptionCngProvider.Windows.cs">
<Link>Microsoft\Data\SqlClient\SqlColumnEncryptionCngProvider.Windows.cs</Link>
Expand Down Expand Up @@ -824,8 +824,8 @@
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalDBAPI.Unix.cs">
<Link>Microsoft\Data\SqlClient\LocalDBAPI.Unix.cs</Link>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Unix.cs">
<Link>Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Unix.cs</Link>
</Compile>

<Compile Include="Microsoft\Data\Sql\SqlDataSourceEnumerator.Unix.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Microsoft.Data.ProviderBase;
using Microsoft.Data.Sql;
using Microsoft.Data.SqlClient.DataClassification;
using Microsoft.Data.SqlClient.LocalDb;
using Microsoft.Data.SqlClient.Server;
using Microsoft.Data.SqlTypes;

Expand Down Expand Up @@ -1557,7 +1558,7 @@ internal SqlError ProcessSNIError(TdsParserStateObject stateObj)
// If its a LocalDB error, then nativeError actually contains a LocalDB-specific error code, not a win32 error code
if (details.sniErrorNumber == SniErrors.LocalDBErrorCode)
{
errorMessage += LocalDBAPI.GetLocalDBMessage((int)details.nativeError);
errorMessage += LocalDbApi.GetLocalDbMessage((int)details.nativeError);
win32ErrorCode = 0;
}
SqlClientEventSource.Log.TryAdvancedTraceEvent("<sc.TdsParser.ProcessSNIError |ERR|ADV > Extracting the latest exception from native SNI. errorMessage: {0}", errorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\EnclaveSessionCache.cs">
<Link>Microsoft\Data\SqlClient\EnclaveSessionCache.cs</Link>
</Compile>
<Compile Include="$(CommonSourceROot)Microsoft\Data\SqlClient\LocalDBAPI.Windows.cs">
<Link>Microsoft\Data\SqlClient\LocalDBAPI.Windows.cs</Link>
<Compile Include="$(CommonSourceROot)Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Windows.cs">
<Link>Microsoft\Data\SqlClient\LocalDb\LocalDbApi.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\LocalDb\LocalDbConfigurationSection.netfx.cs">
<Link>Microsoft\Data\SqlClient\LocalDb\LocalDbConfigurationSection.netfx.cs</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Microsoft.Data.Common;
using Microsoft.Data.Sql;
using Microsoft.Data.SqlClient.DataClassification;
using Microsoft.Data.SqlClient.LocalDb;
using Microsoft.Data.SqlClient.Server;
using Microsoft.Data.SqlTypes;
using Microsoft.SqlServer.Server;
Expand Down Expand Up @@ -418,7 +419,7 @@ internal void Connect(ServerInfo serverInfo,
//Create LocalDB instance if necessary
if (connHandler.ConnectionOptions.LocalDBInstance != null)
{
LocalDBAPI.CreateLocalDBInstance(connHandler.ConnectionOptions.LocalDBInstance);
LocalDbApi.CreateLocalDbInstance(connHandler.ConnectionOptions.LocalDBInstance);
if (encrypt == SqlConnectionEncryptOption.Mandatory)
{
// Encryption is not supported on SQL Local DB - disable it for current session.
Expand Down Expand Up @@ -1678,7 +1679,7 @@ internal SqlError ProcessSNIError(TdsParserStateObject stateObj)
// If its a LocalDB error, then nativeError actually contains a LocalDB-specific error code, not a win32 error code
if (sniError.sniError == SniErrors.LocalDBErrorCode)
{
errorMessage += LocalDBAPI.GetLocalDBMessage((int)sniError.nativeError);
errorMessage += LocalDbApi.GetLocalDbMessage((int)sniError.nativeError);
win32ErrorCode = 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

using System;

namespace Microsoft.Data
namespace Microsoft.Data.SqlClient.LocalDb
{
internal static partial class LocalDBAPI
internal static class LocalDbApi
{
internal static string GetLocalDbInstanceNameFromServerName(string serverName) =>
null;

internal static string GetLocalDBMessage(int hrCode) =>
internal static string GetLocalDbMessage(int hrCode) =>
throw new PlatformNotSupportedException(Strings.LocalDBNotSupported); // LocalDB is not available for Unix and hence it cannot be supported.
}
}
Loading
Loading