Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add | Local DB support for ARM64 and Common Code for LocalDB #2042

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -108,6 +108,9 @@
<Compile Include="..\..\src\Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs">
<Link>Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\DataSource.cs">
<Link>Microsoft\Data\SqlClient\DataSource.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\DataClassification\SensitivityClassification.cs">
<Link>Microsoft\Data\SqlClient\DataClassification\SensitivityClassification.cs</Link>
</Compile>
Expand Down Expand Up @@ -742,7 +745,7 @@
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.uap.cs" />
<Compile Include="Microsoft\Data\SqlClient\PacketHandle.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\SessionHandle.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.uap.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDB.uap.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Managed.cs" />
</ItemGroup>
Expand All @@ -753,8 +756,9 @@
</Compile>
<Compile Include="Interop\SNINativeMethodWrapper.Windows.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Windows.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.Windows.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.Windows.cs" />
<Compile Include="..\..\src\Microsoft\Data\SqlClient\LocalDB.Windows.cs">
<Link>Microsoft\Data\SqlClient\LocalDB.Windows.cs</Link>
</Compile>
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectNative.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Windows.cs" />
</ItemGroup>
Expand All @@ -768,7 +772,6 @@
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.GetProcAddress.cs">
<Link>Common\Interop\Windows\kernel32\Interop.GetProcAddress.cs</Link>
</Compile>
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.Common.cs" />
</ItemGroup>
<!-- Windows dependencies for MANAGED_SNI build -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
Expand All @@ -793,7 +796,7 @@
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\PacketHandle.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\SessionHandle.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDB.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Managed.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Unix.cs" />
</ItemGroup>
Expand Down
@@ -0,0 +1,23 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using Microsoft.Data.ProviderBase;
using Microsoft.Data.Common;

namespace Microsoft.Data.SqlClient
{
internal class LocalDB
{
internal static string GetLocalDBConnectionString(string localDbInstance)
{
throw ADP.LocalDBNotSUpportedException();
}

internal static string GetLocalDBDataSource(string fullServerName, TimeoutTimer timeout)
{
throw ADP.LocalDBNotSUpportedException();
}
}
}
Expand Up @@ -2,13 +2,21 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace Microsoft.Data.SqlClient.SNI
using System;
using Microsoft.Data.ProviderBase;

namespace Microsoft.Data.SqlClient
{
internal class LocalDB
{
internal static string GetLocalDBConnectionString(string localDbInstance)
{
throw new PlatformNotSupportedException(Strings.LocalDBNotSupported); // No Registry support on UAP
}

internal static string GetLocalDBDataSource(string fullServerName, TimeoutTimer timeout)
{
throw new PlatformNotSupportedException(Strings.LocalDBNotSupported); // No Registry support on UAP
Kaur-Parminder marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

This file was deleted.

This file was deleted.

Expand Up @@ -13,7 +13,6 @@ internal static partial class LocalDBAPI
private const string LocalDbPrefix = @"(localdb)\";
private const string LocalDbPrefix_NP = @"np:\\.\pipe\LOCALDB#";


[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
private delegate int LocalDBFormatMessageDelegate(int hrLocalDB, uint dwFlags, uint dwLanguageId, StringBuilder buffer, ref uint buflen);

Expand All @@ -38,7 +37,6 @@ internal static string GetLocalDbInstanceNameFromServerName(string serverName)
{
return input.ToString();
}

}
return null;
}
Expand Down

This file was deleted.