diff --git a/build.cake b/build.cake index 9005628b..9f15ff9e 100644 --- a/build.cake +++ b/build.cake @@ -46,7 +46,7 @@ public class BuildPlan public string DotNetVersion { get; set; } public string[] Frameworks { get; set; } public string[] Rids { get; set; } - public string MainProject { get; set; } + public string[] MainProjects { get; set; } } var buildPlan = JsonConvert.DeserializeObject( @@ -314,37 +314,39 @@ Task("OnlyPublish") .IsDependentOn("SRGen") .IsDependentOn("CodeGen") .Does(() => -{ - var project = buildPlan.MainProject; - var projectFolder = System.IO.Path.Combine(sourceFolder, project); - foreach (var framework in buildPlan.Frameworks) +{ + foreach (var project in buildPlan.MainProjects) { - foreach (var runtime in buildPlan.Rids) + var projectFolder = System.IO.Path.Combine(sourceFolder, project); + foreach (var framework in buildPlan.Frameworks) { - var outputFolder = System.IO.Path.Combine(publishFolder, project, runtime, framework); - var publishArguments = "publish"; - if (!runtime.Equals("default")) + foreach (var runtime in buildPlan.Rids) { - publishArguments = $"{publishArguments} --runtime {runtime}"; - } - publishArguments = $"{publishArguments} --framework {framework} --configuration {configuration}"; - publishArguments = $"{publishArguments} --output \"{outputFolder}\" \"{projectFolder}\""; - Run(dotnetcli, publishArguments) - .ExceptionOnError($"Failed to publish {project} / {framework}"); - //Setting the rpath for System.Security.Cryptography.Native.dylib library - //Only required for mac. We're assuming the openssl is installed in /usr/local/opt/openssl - //If that's not the case user has to run the command manually - if (!IsRunningOnWindows() && runtime.Contains("osx")) - { - Run("install_name_tool", "-add_rpath /usr/local/opt/openssl/lib " + outputFolder + "/System.Security.Cryptography.Native.dylib"); - } - if (requireArchive) - { - Package(runtime, framework, outputFolder, packageFolder, buildPlan.MainProject.ToLower(), workingDirectory); + var outputFolder = System.IO.Path.Combine(publishFolder, project, runtime, framework); + var publishArguments = "publish"; + if (!runtime.Equals("default")) + { + publishArguments = $"{publishArguments} --runtime {runtime}"; + } + publishArguments = $"{publishArguments} --framework {framework} --configuration {configuration}"; + publishArguments = $"{publishArguments} --output \"{outputFolder}\" \"{projectFolder}\""; + Run(dotnetcli, publishArguments) + .ExceptionOnError($"Failed to publish {project} / {framework}"); + //Setting the rpath for System.Security.Cryptography.Native.dylib library + //Only required for mac. We're assuming the openssl is installed in /usr/local/opt/openssl + //If that's not the case user has to run the command manually + if (!IsRunningOnWindows() && runtime.Contains("osx")) + { + Run("install_name_tool", "-add_rpath /usr/local/opt/openssl/lib " + outputFolder + "/System.Security.Cryptography.Native.dylib"); + } + if (requireArchive) + { + Package(runtime, framework, outputFolder, packageFolder, project.ToLower(), workingDirectory); + } } } - } - CreateRunScript(System.IO.Path.Combine(publishFolder, project, "default"), scriptFolder); + CreateRunScript(System.IO.Path.Combine(publishFolder, project, "default"), scriptFolder); + } }); /// @@ -388,21 +390,23 @@ Task("TestPublished") .IsDependentOn("Setup") .Does(() => { - var project = buildPlan.MainProject; - var projectFolder = System.IO.Path.Combine(sourceFolder, project); - var scriptsToTest = new string[] {"SQLTOOLSSERVICE.Core"};//TODO - foreach (var script in scriptsToTest) + foreach (var project in buildPlan.MainProjects) { - var scriptPath = System.IO.Path.Combine(scriptFolder, script); - var didNotExitWithError = Run($"{shell}", $"{shellArgument} \"{scriptPath}\" -s \"{projectFolder}\" --stdio", - new RunOptions - { - TimeOut = 10000 - }) - .DidTimeOut; - if (!didNotExitWithError) + var projectFolder = System.IO.Path.Combine(sourceFolder, project); + var scriptsToTest = new string[] {"SQLTOOLSSERVICE.Core"};//TODO + foreach (var script in scriptsToTest) { - throw new Exception($"Failed to run {script}"); + var scriptPath = System.IO.Path.Combine(scriptFolder, script); + var didNotExitWithError = Run($"{shell}", $"{shellArgument} \"{scriptPath}\" -s \"{projectFolder}\" --stdio", + new RunOptions + { + TimeOut = 10000 + }) + .DidTimeOut; + if (!didNotExitWithError) + { + throw new Exception($"Failed to run {script}"); + } } } }); @@ -439,19 +443,21 @@ Task("Install") .IsDependentOn("CleanupInstall") .Does(() => { - var project = buildPlan.MainProject; - foreach (var framework in buildPlan.Frameworks) + foreach (var project in buildPlan.MainProjects) { - var outputFolder = System.IO.Path.GetFullPath(System.IO.Path.Combine(publishFolder, project, "default", framework)); - var targetFolder = System.IO.Path.GetFullPath(System.IO.Path.Combine(installFolder, framework)); - // Copy all the folders - foreach (var directory in System.IO.Directory.GetDirectories(outputFolder, "*", SearchOption.AllDirectories)) - System.IO.Directory.CreateDirectory(System.IO.Path.Combine(targetFolder, directory.Substring(outputFolder.Length + 1))); - //Copy all the files - foreach (string file in System.IO.Directory.GetFiles(outputFolder, "*", SearchOption.AllDirectories)) - System.IO.File.Copy(file, System.IO.Path.Combine(targetFolder, file.Substring(outputFolder.Length + 1)), true); + foreach (var framework in buildPlan.Frameworks) + { + var outputFolder = System.IO.Path.GetFullPath(System.IO.Path.Combine(publishFolder, project, "default", framework)); + var targetFolder = System.IO.Path.GetFullPath(System.IO.Path.Combine(installFolder, framework)); + // Copy all the folders + foreach (var directory in System.IO.Directory.GetDirectories(outputFolder, "*", SearchOption.AllDirectories)) + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(targetFolder, directory.Substring(outputFolder.Length + 1))); + //Copy all the files + foreach (string file in System.IO.Directory.GetFiles(outputFolder, "*", SearchOption.AllDirectories)) + System.IO.File.Copy(file, System.IO.Path.Combine(targetFolder, file.Substring(outputFolder.Length + 1)), true); + } + CreateRunScript(installFolder, scriptFolder); } - CreateRunScript(installFolder, scriptFolder); }); /// diff --git a/build.json b/build.json index a0741723..01d32d18 100644 --- a/build.json +++ b/build.json @@ -14,5 +14,9 @@ "Frameworks": [ "netcoreapp1.0" ], - "MainProject": "Microsoft.SqlTools.ServiceLayer" + "MainProjects": [ + "Microsoft.SqlTools.ServiceLayer", + "Microsoft.SqlTools.Credentials", + "Microsoft.SqlTools.Hosting" + ] } diff --git a/sqltoolsservice.sln b/sqltoolsservice.sln index 4cbdec69..1007ca46 100644 --- a/sqltoolsservice.sln +++ b/sqltoolsservice.sln @@ -15,6 +15,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md EndProjectSection EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.SqlTools.Credentials", "src\Microsoft.SqlTools.Credentials\Microsoft.SqlTools.Credentials.xproj", "{1D61DC2B-DA66-441D-B9D0-887798F780F9}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.SqlTools.Hosting", "src\Microsoft.SqlTools.Hosting\Microsoft.SqlTools.Hosting.xproj", "{2D61DC2B-DA66-441D-B9D0-919198F780F9}" +EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.SqlTools.ServiceLayer", "src\Microsoft.SqlTools.ServiceLayer\Microsoft.SqlTools.ServiceLayer.xproj", "{0D61DC2B-DA66-441D-B9D0-F76C98F780F9}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.SqlTools.ServiceLayer.Test", "test\Microsoft.SqlTools.ServiceLayer.Test\Microsoft.SqlTools.ServiceLayer.Test.xproj", "{2D771D16-9D85-4053-9F79-E2034737DEEF}" @@ -74,6 +78,18 @@ Global {0D61DC2B-DA66-441D-B9D0-F76C98F780F9}.Integration|Any CPU.Build.0 = Integration|Any CPU {0D61DC2B-DA66-441D-B9D0-F76C98F780F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {0D61DC2B-DA66-441D-B9D0-F76C98F780F9}.Release|Any CPU.Build.0 = Release|Any CPU + {1D61DC2B-DA66-441D-B9D0-887798F780F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D61DC2B-DA66-441D-B9D0-887798F780F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D61DC2B-DA66-441D-B9D0-887798F780F9}.Integration|Any CPU.ActiveCfg = Integration|Any CPU + {1D61DC2B-DA66-441D-B9D0-887798F780F9}.Integration|Any CPU.Build.0 = Integration|Any CPU + {1D61DC2B-DA66-441D-B9D0-887798F780F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D61DC2B-DA66-441D-B9D0-887798F780F9}.Release|Any CPU.Build.0 = Release|Any CPU + {2D61DC2B-DA66-441D-B9D0-919198F780F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D61DC2B-DA66-441D-B9D0-919198F780F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D61DC2B-DA66-441D-B9D0-919198F780F9}.Integration|Any CPU.ActiveCfg = Integration|Any CPU + {2D61DC2B-DA66-441D-B9D0-919198F780F9}.Integration|Any CPU.Build.0 = Integration|Any CPU + {2D61DC2B-DA66-441D-B9D0-919198F780F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D61DC2B-DA66-441D-B9D0-919198F780F9}.Release|Any CPU.Build.0 = Release|Any CPU {2D771D16-9D85-4053-9F79-E2034737DEEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2D771D16-9D85-4053-9F79-E2034737DEEF}.Debug|Any CPU.Build.0 = Debug|Any CPU {2D771D16-9D85-4053-9F79-E2034737DEEF}.Integration|Any CPU.ActiveCfg = Integration|Any CPU @@ -122,6 +138,8 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {0D61DC2B-DA66-441D-B9D0-F76C98F780F9} = {2BBD7364-054F-4693-97CD-1C395E3E84A9} + {1D61DC2B-DA66-441D-B9D0-887798F780F9} = {2BBD7364-054F-4693-97CD-1C395E3E84A9} + {2D61DC2B-DA66-441D-B9D0-919198F780F9} = {2BBD7364-054F-4693-97CD-1C395E3E84A9} {2D771D16-9D85-4053-9F79-E2034737DEEF} = {AB9CA2B8-6F70-431C-8A1D-67479D8A7BE4} {CC785604-6277-4878-8DA9-360C47158E96} = {AB9CA2B8-6F70-431C-8A1D-67479D8A7BE4} {B7D21727-2926-452B-9610-3ADB0BB6D789} = {F9978D78-78FE-4E92-A7D6-D436B7683EF6} diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Contracts/Credential.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Contracts/Credential.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Contracts/Credential.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Contracts/Credential.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/CredentialService.cs b/src/Microsoft.SqlTools.Credentials/Credentials/CredentialService.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/CredentialService.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/CredentialService.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/ICredentialStore.cs b/src/Microsoft.SqlTools.Credentials/Credentials/ICredentialStore.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/ICredentialStore.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/ICredentialStore.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/InteropUtils.cs b/src/Microsoft.SqlTools.Credentials/Credentials/InteropUtils.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/InteropUtils.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/InteropUtils.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/CredentialsWrapper.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/CredentialsWrapper.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/CredentialsWrapper.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Linux/CredentialsWrapper.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/FileTokenStorage.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/FileTokenStorage.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/FileTokenStorage.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Linux/FileTokenStorage.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/Interop.Errors.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Errors.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/Interop.Errors.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Errors.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/Interop.Sys.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Sys.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/Interop.Sys.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Sys.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/LinuxCredentialStore.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/LinuxCredentialStore.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Linux/LinuxCredentialStore.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Linux/LinuxCredentialStore.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/Interop.CoreFoundation.cs b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.CoreFoundation.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/Interop.CoreFoundation.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.CoreFoundation.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/Interop.Libraries.cs b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.Libraries.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/Interop.Libraries.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.Libraries.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/Interop.Security.cs b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.Security.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/Interop.Security.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.Security.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/OSXCredentialStore.cs b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/OSXCredentialStore.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/OSXCredentialStore.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/OSX/OSXCredentialStore.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/SafeCreateHandle.OSX.cs b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/SafeCreateHandle.OSX.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/OSX/SafeCreateHandle.OSX.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/OSX/SafeCreateHandle.OSX.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/SecureStringHelper.cs b/src/Microsoft.SqlTools.Credentials/Credentials/SecureStringHelper.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/SecureStringHelper.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/SecureStringHelper.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/CredentialSet.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/CredentialSet.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/CredentialSet.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Win32/CredentialSet.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/CredentialType.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/CredentialType.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/CredentialType.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Win32/CredentialType.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/GlobalSuppressions.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/GlobalSuppressions.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/GlobalSuppressions.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Win32/GlobalSuppressions.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/NativeMethods.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/NativeMethods.cs similarity index 99% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/NativeMethods.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Win32/NativeMethods.cs index 33d7d75b..a75f7615 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/NativeMethods.cs +++ b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/NativeMethods.cs @@ -6,6 +6,7 @@ using System; using System.Runtime.InteropServices; using System.Text; +using Microsoft.SqlTools.Credentials; namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32 { diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/PersistanceType.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/PersistanceType.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/PersistanceType.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Win32/PersistanceType.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/Win32Credential.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/Win32Credential.cs similarity index 99% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/Win32Credential.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Win32/Win32Credential.cs index 34ae08cc..fc2f13f2 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/Win32Credential.cs +++ b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/Win32Credential.cs @@ -7,6 +7,7 @@ using System; using System.Runtime.InteropServices; using System.Security; using System.Text; +using Microsoft.SqlTools.Credentials; namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32 { diff --git a/src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/Win32CredentialStore.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/Win32CredentialStore.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Credentials/Win32/Win32CredentialStore.cs rename to src/Microsoft.SqlTools.Credentials/Credentials/Win32/Win32CredentialStore.cs diff --git a/src/Microsoft.SqlTools.Credentials/HostLoader.cs b/src/Microsoft.SqlTools.Credentials/HostLoader.cs new file mode 100644 index 00000000..21da458b --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/HostLoader.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.SqlTools.ServiceLayer.Credentials; +using Microsoft.SqlTools.ServiceLayer.Extensibility; +using Microsoft.SqlTools.ServiceLayer.Hosting; +using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol; +using Microsoft.SqlTools.ServiceLayer.SqlContext; + +namespace Microsoft.SqlTools.Credentials +{ + /// + /// Provides support for starting up a service host. This is a common responsibility + /// for both the main service program and test driver that interacts with it + /// + public static class HostLoader + { + private static object lockObject = new object(); + private static bool isLoaded; + + internal static ServiceHost CreateAndStartServiceHost(SqlToolsContext sqlToolsContext) + { + ServiceHost serviceHost = ServiceHost.Instance; + lock (lockObject) + { + if (!isLoaded) + { + // Grab the instance of the service host + serviceHost.Initialize(); + + InitializeRequestHandlersAndServices(serviceHost, sqlToolsContext); + + // Start the service only after all request handlers are setup. This is vital + // as otherwise the Initialize event can be lost - it's processed and discarded before the handler + // is hooked up to receive the message + serviceHost.Start().Wait(); + isLoaded = true; + } + } + return serviceHost; + } + + private static void InitializeRequestHandlersAndServices(ServiceHost serviceHost, SqlToolsContext sqlToolsContext) + { + // Load extension provider, which currently finds all exports in current DLL. Can be changed to find based + // on directory or assembly list quite easily in the future + ExtensionServiceProvider serviceProvider = ExtensionServiceProvider.CreateDefaultServiceProvider(); + serviceProvider.RegisterSingleService(sqlToolsContext); + serviceProvider.RegisterSingleService(serviceHost); + + CredentialService.Instance.InitializeService(serviceHost); + serviceProvider.RegisterSingleService(CredentialService.Instance); + + InitializeHostedServices(serviceProvider, serviceHost); + + serviceHost.InitializeRequestHandlers(); + } + + /// + /// Internal to support testing. Initializes instances in the service, + /// and registers them for their preferred service type + /// + internal static void InitializeHostedServices(RegisteredServiceProvider provider, IProtocolEndpoint host) + { + // Pre-register all services before initializing. This ensures that if one service wishes to reference + // another one during initialization, it will be able to safely do so + foreach (IHostedService service in provider.GetServices()) + { + provider.RegisterSingleService(service.ServiceType, service); + } + + foreach (IHostedService service in provider.GetServices()) + { + // Initialize all hosted services, and register them in the service provider for their requested + // service type. This ensures that when searching for the ConnectionService you can get it without + // searching for an IHostedService of type ConnectionService + service.InitializeService(host); + } + } + } +} diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.Designer.cs b/src/Microsoft.SqlTools.Credentials/Localization/sr.Designer.cs new file mode 100644 index 00000000..18805258 --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.Designer.cs @@ -0,0 +1,953 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.SqlTools.Credentials.Localization { + using System; + using System.Reflection; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class sr { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + internal sr() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.SqlTools.ServiceLayer.Localization.sr", typeof(sr).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to File '{0}' recursively included.. + /// + public static string BatchParser_CircularReference { + get { + return ResourceManager.GetString("BatchParser_CircularReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Missing end comment mark '*/'.. + /// + public static string BatchParser_CommentNotTerminated { + get { + return ResourceManager.GetString("BatchParser_CommentNotTerminated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incorrect syntax was encountered while parsing '{0}'.. + /// + public static string BatchParser_IncorrectSyntax { + get { + return ResourceManager.GetString("BatchParser_IncorrectSyntax", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unclosed quotation mark after the character string.. + /// + public static string BatchParser_StringNotTerminated { + get { + return ResourceManager.GetString("BatchParser_StringNotTerminated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Variable {0} is not defined.. + /// + public static string BatchParser_VariableNotDefined { + get { + return ResourceManager.GetString("BatchParser_VariableNotDefined", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Canceling batch parser wrapper batch execution.. + /// + public static string BatchParserWrapperExecutionEngineBatchCancelling { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineBatchCancelling", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1}. + /// + public static string BatchParserWrapperExecutionEngineBatchMessage { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineBatchMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch parser wrapper execution engine batch ResultSet finished.. + /// + public static string BatchParserWrapperExecutionEngineBatchResultSetFinished { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineBatchResultSetFinished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1}. + /// + public static string BatchParserWrapperExecutionEngineBatchResultSetProcessing { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineBatchResultSetProcessing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SQL Execution error: {0}. + /// + public static string BatchParserWrapperExecutionEngineError { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3}. + /// + public static string BatchParserWrapperExecutionError { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connection details object cannot be null. + /// + public static string ConnectionParamsValidateNullConnection { + get { + return ResourceManager.GetString("ConnectionParamsValidateNullConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OwnerUri cannot be null or empty. + /// + public static string ConnectionParamsValidateNullOwnerUri { + get { + return ResourceManager.GetString("ConnectionParamsValidateNullOwnerUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServerName cannot be null or empty. + /// + public static string ConnectionParamsValidateNullServerName { + get { + return ResourceManager.GetString("ConnectionParamsValidateNullServerName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} cannot be null or empty when using SqlLogin authentication. + /// + public static string ConnectionParamsValidateNullSqlAuth { + get { + return ResourceManager.GetString("ConnectionParamsValidateNullSqlAuth", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connection parameters cannot be null. + /// + public static string ConnectionServiceConnectErrorNullParams { + get { + return ResourceManager.GetString("ConnectionServiceConnectErrorNullParams", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connection canceled. + /// + public static string ConnectionServiceConnectionCanceled { + get { + return ResourceManager.GetString("ConnectionServiceConnectionCanceled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value '{0}' for AuthenticationType. Valid values are 'Integrated' and 'SqlLogin'.. + /// + public static string ConnectionServiceConnStringInvalidAuthType { + get { + return ResourceManager.GetString("ConnectionServiceConnStringInvalidAuthType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value '{0}' for ApplicationIntent. Valid values are 'ReadWrite' and 'ReadOnly'.. + /// + public static string ConnectionServiceConnStringInvalidIntent { + get { + return ResourceManager.GetString("ConnectionServiceConnStringInvalidIntent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SpecifiedUri '{0}' does not have existing connection. + /// + public static string ConnectionServiceListDbErrorNotConnected { + get { + return ResourceManager.GetString("ConnectionServiceListDbErrorNotConnected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OwnerUri cannot be null or empty. + /// + public static string ConnectionServiceListDbErrorNullOwnerUri { + get { + return ResourceManager.GetString("ConnectionServiceListDbErrorNullOwnerUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Win32Credential object is already disposed. + /// + public static string CredentialServiceWin32CredentialDisposed { + get { + return ResourceManager.GetString("CredentialServiceWin32CredentialDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid CriticalHandle!. + /// + public static string CredentialsServiceInvalidCriticalHandle { + get { + return ResourceManager.GetString("CredentialsServiceInvalidCriticalHandle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password has exceeded 512 bytes. + /// + public static string CredentialsServicePasswordLengthExceeded { + get { + return ResourceManager.GetString("CredentialsServicePasswordLengthExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target must be specified to delete a credential. + /// + public static string CredentialsServiceTargetForDelete { + get { + return ResourceManager.GetString("CredentialsServiceTargetForDelete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target must be specified to check existance of a credential. + /// + public static string CredentialsServiceTargetForLookup { + get { + return ResourceManager.GetString("CredentialsServiceTargetForLookup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while the batch was being processed. The error message is: {0}. + /// + public static string EE_BatchError_Exception { + get { + return ResourceManager.GetString("EE_BatchError_Exception", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while the batch was being executed.. + /// + public static string EE_BatchExecutionError_Halting { + get { + return ResourceManager.GetString("EE_BatchExecutionError_Halting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while the batch was being executed, but the error has been ignored.. + /// + public static string EE_BatchExecutionError_Ignoring { + get { + return ResourceManager.GetString("EE_BatchExecutionError_Ignoring", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ({0} row(s) affected). + /// + public static string EE_BatchExecutionInfo_RowsAffected { + get { + return ResourceManager.GetString("EE_BatchExecutionInfo_RowsAffected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Msg {0}, Level {1}, State {2}. + /// + public static string EE_BatchSqlMessageNoLineInfo { + get { + return ResourceManager.GetString("EE_BatchSqlMessageNoLineInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Msg {0}, Level {1}, State {2}, Line {3}. + /// + public static string EE_BatchSqlMessageNoProcedureInfo { + get { + return ResourceManager.GetString("EE_BatchSqlMessageNoProcedureInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4}. + /// + public static string EE_BatchSqlMessageWithProcedureInfo { + get { + return ResourceManager.GetString("EE_BatchSqlMessageWithProcedureInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Command {0} is not supported.. + /// + public static string EE_ExecutionError_CommandNotSupported { + get { + return ResourceManager.GetString("EE_ExecutionError_CommandNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The variable {0} could not be found.. + /// + public static string EE_ExecutionError_VariableNotFound { + get { + return ResourceManager.GetString("EE_ExecutionError_VariableNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execution completed {0} times.... + /// + public static string EE_ExecutionInfo_FinalizingLoop { + get { + return ResourceManager.GetString("EE_ExecutionInfo_FinalizingLoop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting execution loop of {0} times.... + /// + public static string EE_ExecutionInfo_InitilizingLoop { + get { + return ResourceManager.GetString("EE_ExecutionInfo_InitilizingLoop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You cancelled the query.. + /// + public static string EE_ExecutionInfo_QueryCancelledbyUser { + get { + return ResourceManager.GetString("EE_ExecutionInfo_QueryCancelledbyUser", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The previous execution is not yet complete.. + /// + public static string EE_ExecutionNotYetCompleteError { + get { + return ResourceManager.GetString("EE_ExecutionNotYetCompleteError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A scripting error occurred.. + /// + public static string EE_ScriptError_Error { + get { + return ResourceManager.GetString("EE_ScriptError_Error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A fatal error occurred.. + /// + public static string EE_ScriptError_FatalError { + get { + return ResourceManager.GetString("EE_ScriptError_FatalError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incorrect syntax was encountered while {0} was being parsed.. + /// + public static string EE_ScriptError_ParsingSyntax { + get { + return ResourceManager.GetString("EE_ScriptError_ParsingSyntax", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scripting warning.. + /// + public static string EE_ScriptError_Warning { + get { + return ResourceManager.GetString("EE_ScriptError_Warning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replacement of an empty string by an empty string.. + /// + public static string ErrorEmptyStringReplacement { + get { + return ResourceManager.GetString("ErrorEmptyStringReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot convert SqlCodeObject Type {0} to Type {1}. + /// + public static string ErrorUnexpectedCodeObjectType { + get { + return ResourceManager.GetString("ErrorUnexpectedCodeObjectType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message header must separate key and value using ':'. + /// + public static string HostingHeaderMissingColon { + get { + return ResourceManager.GetString("HostingHeaderMissingColon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fatal error: Content-Length header must be provided. + /// + public static string HostingHeaderMissingContentLengthHeader { + get { + return ResourceManager.GetString("HostingHeaderMissingContentLengthHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fatal error: Content-Length value is not an integer. + /// + public static string HostingHeaderMissingContentLengthValue { + get { + return ResourceManager.GetString("HostingHeaderMissingContentLengthValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MessageReader's input stream ended unexpectedly, terminating. + /// + public static string HostingUnexpectedEndOfStream { + get { + return ResourceManager.GetString("HostingUnexpectedEndOfStream", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service of type {0} cannot be created by ExtensionLoader<{1}>. + /// + public static string IncompatibleServiceForExtensionLoader { + get { + return ResourceManager.GetString("IncompatibleServiceForExtensionLoader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple services found for type {0}, expected only 1. + /// + public static string MultipleServicesFound { + get { + return ResourceManager.GetString("MultipleServicesFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This feature is currently not supported on Azure SQL DB and Data Warehouse: {0}. + /// + public static string PeekDefinitionAzureError { + get { + return ResourceManager.GetString("PeekDefinitionAzureError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No database object was retrieved.. + /// + public static string PeekDefinitionDatabaseError { + get { + return ResourceManager.GetString("PeekDefinitionDatabaseError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unexpected error occurred during Peek Definition execution: {0}. + /// + public static string PeekDefinitionError { + get { + return ResourceManager.GetString("PeekDefinitionError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No results were found.. + /// + public static string PeekDefinitionNoResultsError { + get { + return ResourceManager.GetString("PeekDefinitionNoResultsError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to a server.. + /// + public static string PeekDefinitionNotConnectedError { + get { + return ResourceManager.GetString("PeekDefinitionNotConnectedError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation timed out.. + /// + public static string PeekDefinitionTimedoutError { + get { + return ResourceManager.GetString("PeekDefinitionTimedoutError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This object type is currently not supported by this feature.. + /// + public static string PeekDefinitionTypeNotSupportedError { + get { + return ResourceManager.GetString("PeekDefinitionTypeNotSupportedError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (1 row affected). + /// + public static string QueryServiceAffectedOneRow { + get { + return ResourceManager.GetString("QueryServiceAffectedOneRow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ({0} rows affected). + /// + public static string QueryServiceAffectedRows { + get { + return ResourceManager.GetString("QueryServiceAffectedRows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The query has already completed, it cannot be cancelled. + /// + public static string QueryServiceCancelAlreadyCompleted { + get { + return ResourceManager.GetString("QueryServiceCancelAlreadyCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Query successfully cancelled, failed to dispose query. Owner URI not found.. + /// + public static string QueryServiceCancelDisposeFailed { + get { + return ResourceManager.GetString("QueryServiceCancelDisposeFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (No column name). + /// + public static string QueryServiceColumnNull { + get { + return ResourceManager.GetString("QueryServiceColumnNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Commands completed successfully.. + /// + public static string QueryServiceCompletedSuccessfully { + get { + return ResourceManager.GetString("QueryServiceCompletedSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of bytes to return must be greater than zero. + /// + public static string QueryServiceDataReaderByteCountInvalid { + get { + return ResourceManager.GetString("QueryServiceDataReaderByteCountInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of chars to return must be greater than zero. + /// + public static string QueryServiceDataReaderCharCountInvalid { + get { + return ResourceManager.GetString("QueryServiceDataReaderCharCountInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of XML bytes to return must be greater than zero. + /// + public static string QueryServiceDataReaderXmlCountInvalid { + get { + return ResourceManager.GetString("QueryServiceDataReaderXmlCountInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Msg {0}, Level {1}, State {2}, Line {3}{4}{5}. + /// + public static string QueryServiceErrorFormat { + get { + return ResourceManager.GetString("QueryServiceErrorFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not retrieve an execution plan from the result set . + /// + public static string QueryServiceExecutionPlanNotFound { + get { + return ResourceManager.GetString("QueryServiceExecutionPlanNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to FileStreamWrapper must be initialized before performing operations. + /// + public static string QueryServiceFileWrapperNotInitialized { + get { + return ResourceManager.GetString("QueryServiceFileWrapperNotInitialized", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This FileStreamWrapper cannot be used for writing. + /// + public static string QueryServiceFileWrapperReadOnly { + get { + return ResourceManager.GetString("QueryServiceFileWrapperReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Access method cannot be write-only. + /// + public static string QueryServiceFileWrapperWriteOnly { + get { + return ResourceManager.GetString("QueryServiceFileWrapperWriteOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sender for OnInfoMessage event must be a SqlConnection. + /// + public static string QueryServiceMessageSenderNotSql { + get { + return ResourceManager.GetString("QueryServiceMessageSenderNotSql", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Query was canceled by user. + /// + public static string QueryServiceQueryCancelled { + get { + return ResourceManager.GetString("QueryServiceQueryCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Query failed: {0}. + /// + public static string QueryServiceQueryFailed { + get { + return ResourceManager.GetString("QueryServiceQueryFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A query is already in progress for this editor session. Please cancel this query or wait for its completion.. + /// + public static string QueryServiceQueryInProgress { + get { + return ResourceManager.GetString("QueryServiceQueryInProgress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This editor is not connected to a database. + /// + public static string QueryServiceQueryInvalidOwnerUri { + get { + return ResourceManager.GetString("QueryServiceQueryInvalidOwnerUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested query does not exist. + /// + public static string QueryServiceRequestsNoQuery { + get { + return ResourceManager.GetString("QueryServiceRequestsNoQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not retrieve column schema for result set. + /// + public static string QueryServiceResultSetNoColumnSchema { + get { + return ResourceManager.GetString("QueryServiceResultSetNoColumnSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot read subset unless the results have been read from the server. + /// + public static string QueryServiceResultSetNotRead { + get { + return ResourceManager.GetString("QueryServiceResultSetNotRead", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reader cannot be null. + /// + public static string QueryServiceResultSetReaderNull { + get { + return ResourceManager.GetString("QueryServiceResultSetReaderNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Row count must be a positive integer. + /// + public static string QueryServiceResultSetRowCountOutOfRange { + get { + return ResourceManager.GetString("QueryServiceResultSetRowCountOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start row cannot be less than 0 or greater than the number of rows in the result set. + /// + public static string QueryServiceResultSetStartRowOutOfRange { + get { + return ResourceManager.GetString("QueryServiceResultSetStartRowOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to save {0}: {1}. + /// + public static string QueryServiceSaveAsFail { + get { + return ResourceManager.GetString("QueryServiceSaveAsFail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A save request to the same path is in progress. + /// + public static string QueryServiceSaveAsInProgress { + get { + return ResourceManager.GetString("QueryServiceSaveAsInProgress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal error occurred while starting save task. + /// + public static string QueryServiceSaveAsMiscStartingError { + get { + return ResourceManager.GetString("QueryServiceSaveAsMiscStartingError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Result cannot be saved until query execution has completed. + /// + public static string QueryServiceSaveAsResultSetNotComplete { + get { + return ResourceManager.GetString("QueryServiceSaveAsResultSetNotComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The batch has not completed, yet. + /// + public static string QueryServiceSubsetBatchNotCompleted { + get { + return ResourceManager.GetString("QueryServiceSubsetBatchNotCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch index cannot be less than 0 or greater than the number of batches. + /// + public static string QueryServiceSubsetBatchOutOfRange { + get { + return ResourceManager.GetString("QueryServiceSubsetBatchOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Result set index cannot be less than 0 or greater than the number of result sets. + /// + public static string QueryServiceSubsetResultSetOutOfRange { + get { + return ResourceManager.GetString("QueryServiceSubsetResultSetOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot register service for type {0}, one or more services already registered. + /// + public static string ServiceAlreadyRegistered { + get { + return ResourceManager.GetString("ServiceAlreadyRegistered", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} was not found in the service provider. + /// + public static string ServiceNotFound { + get { + return ResourceManager.GetString("ServiceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service of Type {0} is not compatible with registered Type {1}. + /// + public static string ServiceNotOfExpectedType { + get { + return ResourceManager.GetString("ServiceNotOfExpectedType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SetServiceProvider() was not called to establish the required service provider. + /// + public static string ServiceProviderNotSet { + get { + return ResourceManager.GetString("ServiceProviderNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EN_LOCALIZATION. + /// + public static string TestLocalizationConstant { + get { + return ResourceManager.GetString("TestLocalizationConstant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For more information about this error, see the troubleshooting topics in the product documentation.. + /// + public static string TroubleshootingAssistanceMessage { + get { + return ResourceManager.GetString("TroubleshootingAssistanceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start position ({0}, {1}) must come before or be equal to the end position ({2}, {3}). + /// + public static string WorkspaceServiceBufferPositionOutOfOrder { + get { + return ResourceManager.GetString("WorkspaceServiceBufferPositionOutOfOrder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Position is outside of column range for line {0}. + /// + public static string WorkspaceServicePositionColumnOutOfRange { + get { + return ResourceManager.GetString("WorkspaceServicePositionColumnOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Position is outside of file line range. + /// + public static string WorkspaceServicePositionLineOutOfRange { + get { + return ResourceManager.GetString("WorkspaceServicePositionLineOutOfRange", resourceCulture); + } + } + } +} diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.cs b/src/Microsoft.SqlTools.Credentials/Localization/sr.cs new file mode 100755 index 00000000..6dd123a5 --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.cs @@ -0,0 +1,117 @@ +// WARNING: +// This file was generated by the Microsoft DataWarehouse String Resource Tool 1.37.0.0 +// from information in sr.strings +// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN +// +namespace Microsoft.SqlTools.Credentials +{ + using System; + using System.Reflection; + using System.Resources; + using System.Globalization; + + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class SR + { + protected SR() + { } + + public static CultureInfo Culture + { + get + { + return Keys.Culture; + } + set + { + Keys.Culture = value; + } + } + + + public static string CredentialsServiceInvalidCriticalHandle + { + get + { + return Keys.GetString(Keys.CredentialsServiceInvalidCriticalHandle); + } + } + + public static string CredentialsServicePasswordLengthExceeded + { + get + { + return Keys.GetString(Keys.CredentialsServicePasswordLengthExceeded); + } + } + + public static string CredentialsServiceTargetForDelete + { + get + { + return Keys.GetString(Keys.CredentialsServiceTargetForDelete); + } + } + + public static string CredentialsServiceTargetForLookup + { + get + { + return Keys.GetString(Keys.CredentialsServiceTargetForLookup); + } + } + + public static string CredentialServiceWin32CredentialDisposed + { + get + { + return Keys.GetString(Keys.CredentialServiceWin32CredentialDisposed); + } + } + + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Keys + { + static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.Credentials.Localization.SR", typeof(SR).GetTypeInfo().Assembly); + + static CultureInfo _culture = null; + + + public const string CredentialsServiceInvalidCriticalHandle = "CredentialsServiceInvalidCriticalHandle"; + + + public const string CredentialsServicePasswordLengthExceeded = "CredentialsServicePasswordLengthExceeded"; + + + public const string CredentialsServiceTargetForDelete = "CredentialsServiceTargetForDelete"; + + + public const string CredentialsServiceTargetForLookup = "CredentialsServiceTargetForLookup"; + + + public const string CredentialServiceWin32CredentialDisposed = "CredentialServiceWin32CredentialDisposed"; + + + private Keys() + { } + + public static CultureInfo Culture + { + get + { + return _culture; + } + set + { + _culture = value; + } + } + + public static string GetString(string key) + { + return resourceManager.GetString(key, _culture); + } + + } + } +} diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.es.resx b/src/Microsoft.SqlTools.Credentials/Localization/sr.es.resx new file mode 100644 index 00000000..f43e5c5e --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.es.resx @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +text/microsoft-resx1.3System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089ES_LOCALIZATION + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.resx b/src/Microsoft.SqlTools.Credentials/Localization/sr.resx new file mode 100755 index 00000000..b2ab23ff --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.resx @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Invalid CriticalHandle! + + + + The password has exceeded 512 bytes + + + + Target must be specified to delete a credential + + + + Target must be specified to check existance of a credential + + + + Win32Credential object is already disposed + + + diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.strings b/src/Microsoft.SqlTools.Credentials/Localization/sr.strings new file mode 100644 index 00000000..4c3b2f64 --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.strings @@ -0,0 +1,34 @@ +# String resource file +# +# When processed by the String Resource Tool, this file generates +# both a .CS and a .RESX file with the same name as the file. +# The .CS file contains a class which can be used to access these +# string resources, including the ability to format in +# parameters, which are identified with the .NET {x} format +# (see String.Format help). +# +# Comments below assume the file name is SR.strings. +# +# Lines starting with a semicolon ";" are also treated as comments, but +# in a future version they will be extracted and made available in LocStudio +# Put your comments to localizers _before_ the string they apply to. +# +# SMO build specific comment +# after generating the .resx file, run srgen on it and get the .resx file +# please remember to also check that .resx in, along with the +# .strings and .cs files + +[strings] + +############################################################################ +# Credentials Service + +CredentialsServiceInvalidCriticalHandle = Invalid CriticalHandle! + +CredentialsServicePasswordLengthExceeded = The password has exceeded 512 bytes + +CredentialsServiceTargetForDelete = Target must be specified to delete a credential + +CredentialsServiceTargetForLookup = Target must be specified to check existance of a credential + +CredentialServiceWin32CredentialDisposed = Win32Credential object is already disposed diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.xlf b/src/Microsoft.SqlTools.Credentials/Localization/sr.xlf new file mode 100644 index 00000000..b340af8b --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.xlf @@ -0,0 +1,32 @@ + + + + + + Invalid CriticalHandle! + Invalid CriticalHandle! + + + + The password has exceeded 512 bytes + The password has exceeded 512 bytes + + + + Target must be specified to delete a credential + Target must be specified to delete a credential + + + + Target must be specified to check existance of a credential + Target must be specified to check existance of a credential + + + + Win32Credential object is already disposed + Win32Credential object is already disposed + + + + + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.Credentials/Localization/transXliff/sr.es.xlf b/src/Microsoft.SqlTools.Credentials/Localization/transXliff/sr.es.xlf new file mode 100644 index 00000000..3860e1bf --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Localization/transXliff/sr.es.xlf @@ -0,0 +1,12 @@ + + + + + + ES_LOCALIZATION + ES_LOCALIZATION + + + + + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.xproj b/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.xproj new file mode 100644 index 00000000..c2af1258 --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.xproj @@ -0,0 +1,19 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + {1D61DC2B-DA66-441D-B9D0-887798F780F9} + Microsoft.SqlTools.Credentials + .\obj + .\bin\ + v4.5.2 + + + 2.0 + + + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.Credentials/Program.cs b/src/Microsoft.SqlTools.Credentials/Program.cs new file mode 100644 index 00000000..eb97091e --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Program.cs @@ -0,0 +1,47 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using Microsoft.SqlTools.Credentials.Utility; +using Microsoft.SqlTools.ServiceLayer.Hosting; +using Microsoft.SqlTools.ServiceLayer.SqlContext; +using Microsoft.SqlTools.ServiceLayer.Utility; + +namespace Microsoft.SqlTools.Credentials +{ + /// + /// Main application class for Credentials Service Host executable + /// + internal class Program + { + /// + /// Main entry point into the Credentials Service Host + /// + internal static void Main(string[] args) + { + // read command-line arguments + CommandOptions commandOptions = new CommandOptions(args); + if (commandOptions.ShouldExit) + { + return; + } + + // turn on Verbose logging during early development + // we need to switch to Normal when preparing for public preview + Logger.Initialize(minimumLogLevel: LogLevel.Verbose, isEnabled: commandOptions.EnableLogging); + Logger.Write(LogLevel.Normal, "Starting SqlTools Credentials Provider"); + + // set up the host details and profile paths + var hostDetails = new HostDetails( + name: "SqlTools Credentials Provider", + profileId: "Microsoft.SqlTools.Credentials", + version: new Version(1, 0)); + + SqlToolsContext sqlToolsContext = new SqlToolsContext(hostDetails); + ServiceHost serviceHost = HostLoader.CreateAndStartServiceHost(sqlToolsContext); + + serviceHost.WaitForExit(); + } + } +} diff --git a/src/Microsoft.SqlTools.Credentials/Properties/AssemblyInfo.cs b/src/Microsoft.SqlTools.Credentials/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..1e40d43a --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Properties/AssemblyInfo.cs @@ -0,0 +1,48 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SqlTools Credentials Library")] +[assembly: AssemblyDescription("Provides SqlTools credential management functionality.")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("SqlTools Credentials Services")] +[assembly: AssemblyCopyright("� Microsoft Corporation. All rights reserved.")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("131E0A47-C9C9-48E4-8C4F-D3A64B51A2B2")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyInformationalVersion("1.0.0.0")] + + +[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.Test")] +[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.IntegrationTests")] +[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.Test.Common")] + diff --git a/src/Microsoft.SqlTools.Credentials/Utility/CommandOptions.cs b/src/Microsoft.SqlTools.Credentials/Utility/CommandOptions.cs new file mode 100644 index 00000000..6c66a49e --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/Utility/CommandOptions.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +namespace Microsoft.SqlTools.Credentials.Utility +{ + /// + /// The command-line options helper class. + /// + internal class CommandOptions + { + /// + /// Construct and parse command line options from the arguments array + /// + public CommandOptions(string[] args) + { + ErrorMessage = string.Empty; + + try + { + for (int i = 0; i < args.Length; ++i) + { + string arg = args[i]; + if (arg.StartsWith("--") || arg.StartsWith("-")) + { + switch (arg) + { + case "-enable-logging": + EnableLogging = true; + break; + case "h": + case "-help": + ShouldExit = true; + return; + default: + ErrorMessage += String.Format("Unknown argument \"{0}\"" + Environment.NewLine, arg); + break; + } + } + } + } + catch (Exception ex) + { + ErrorMessage += ex.ToString(); + return; + } + finally + { + if (!string.IsNullOrEmpty(ErrorMessage) || ShouldExit) + { + Console.WriteLine(Usage); + ShouldExit = true; + } + } + } + + internal string ErrorMessage { get; private set; } + + /// + /// Whether diagnostic logging is enabled + /// + public bool EnableLogging { get; private set; } + + /// + /// Whether the program should exit immediately. Set to true when the usage is printed. + /// + public bool ShouldExit { get; private set; } + + /// + /// Get the usage string describing command-line arguments for the program + /// + public string Usage + { + get + { + var str = string.Format("{0}" + Environment.NewLine + + "Microsoft.SqlTools.Credentials " + Environment.NewLine + + " Options:" + Environment.NewLine + + " [--enable-logging]" + Environment.NewLine + + " [--help]" + Environment.NewLine, + ErrorMessage); + return str; + } + } + } +} diff --git a/src/Microsoft.SqlTools.Credentials/project.json b/src/Microsoft.SqlTools.Credentials/project.json new file mode 100644 index 00000000..f5610383 --- /dev/null +++ b/src/Microsoft.SqlTools.Credentials/project.json @@ -0,0 +1,67 @@ +{ + "name": "Microsoft.SqlTools.Credentials", + "version": "1.0.0-*", + "buildOptions": { + "debugType": "portable", + "emitEntryPoint": true, + "embed": [ + "../Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx", + "../Microsoft.SqlTools.ServiceLayer/Localization/sr.resx" + ] + }, + "configurations": { + "Integration": { + "buildOptions": { + "define": [ + "WINDOWS_ONLY_BUILD" + ], + "emitEntryPoint": true + } + } + }, + "dependencies": { + "Newtonsoft.Json": "9.0.1", + "System.Security.SecureString": "4.0.0", + "System.Collections.Specialized": "4.0.1", + "System.ComponentModel.TypeConverter": "4.1.0", + "System.Diagnostics.Contracts": "4.0.1", + "System.Diagnostics.TraceSource": "4.0.0", + "NETStandard.Library": "1.6.0", + "Microsoft.NETCore.Runtime.CoreCLR": "1.0.2", + "Microsoft.NETCore.DotNetHostPolicy": "1.0.1", + "Microsoft.DiaSymReader.Native": "1.4.1", + "System.Diagnostics.Process": "4.1.0", + "System.Threading.Thread": "4.0.0", + "System.Runtime.Loader": "4.0.0", + "System.Composition.Runtime": "1.0.31", + "System.Composition.Convention": "1.0.31", + "System.Composition.TypedParts": "1.0.31", + "Microsoft.Extensions.DependencyModel": "1.0.0", + "System.Runtime": "4.3.0", + "Microsoft.SqlTools.Hosting": { + "target": "project" + } + }, + "frameworks": { + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": { + "version": "1.0.0" + } + }, + "imports": "dnxcore50" + } + }, + "runtimes": { + "win7-x64": {}, + "win7-x86": {}, + "osx.10.11-x64": {}, + "ubuntu.14.04-x64": {}, + "ubuntu.16.04-x64": {}, + "centos.7-x64": {}, + "rhel.7.2-x64": {}, + "debian.8-x64": {}, + "fedora.23-x64": {}, + "opensuse.13.2-x64": {} + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/Extensibility/ExtensionServiceProvider.cs b/src/Microsoft.SqlTools.Hosting/Extensibility/ExtensionServiceProvider.cs similarity index 88% rename from src/Microsoft.SqlTools.ServiceLayer/Extensibility/ExtensionServiceProvider.cs rename to src/Microsoft.SqlTools.Hosting/Extensibility/ExtensionServiceProvider.cs index a3802e36..a031305b 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Extensibility/ExtensionServiceProvider.cs +++ b/src/Microsoft.SqlTools.Hosting/Extensibility/ExtensionServiceProvider.cs @@ -29,7 +29,28 @@ namespace Microsoft.SqlTools.ServiceLayer.Extensibility public static ExtensionServiceProvider CreateDefaultServiceProvider() { - return Create(typeof(ExtensionStore).GetTypeInfo().Assembly.SingleItemAsEnumerable()); + string assemblyPath = typeof(ExtensionStore).GetTypeInfo().Assembly.Location; + string directory = Path.GetDirectoryName(assemblyPath); + + AssemblyLoadContext context = new AssemblyLoader(directory); + var assemblyPaths = Directory.GetFiles(directory, "*.dll", SearchOption.TopDirectoryOnly); + + List assemblies = new List(); + foreach (var path in assemblyPaths) + { + try + { + assemblies.Add( + context.LoadFromAssemblyName( + AssemblyLoadContext.GetAssemblyName(path))); + } + catch (System.BadImageFormatException) + { + // we expect exceptions trying to scan all DLLs since directory contains native libraries + } + } + + return Create(assemblies); } public static ExtensionServiceProvider Create(IEnumerable assemblies) diff --git a/src/Microsoft.SqlTools.ServiceLayer/Extensibility/IComposableService.cs b/src/Microsoft.SqlTools.Hosting/Extensibility/IComposableService.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Extensibility/IComposableService.cs rename to src/Microsoft.SqlTools.Hosting/Extensibility/IComposableService.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Extensibility/IEnumerableExt.cs b/src/Microsoft.SqlTools.Hosting/Extensibility/IEnumerableExt.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Extensibility/IEnumerableExt.cs rename to src/Microsoft.SqlTools.Hosting/Extensibility/IEnumerableExt.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Extensibility/IMultiServiceProvider.cs b/src/Microsoft.SqlTools.Hosting/Extensibility/IMultiServiceProvider.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Extensibility/IMultiServiceProvider.cs rename to src/Microsoft.SqlTools.Hosting/Extensibility/IMultiServiceProvider.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Extensibility/RegisteredServiceProvider.cs b/src/Microsoft.SqlTools.Hosting/Extensibility/RegisteredServiceProvider.cs similarity index 99% rename from src/Microsoft.SqlTools.ServiceLayer/Extensibility/RegisteredServiceProvider.cs rename to src/Microsoft.SqlTools.Hosting/Extensibility/RegisteredServiceProvider.cs index fe205eda..5f7f2fac 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Extensibility/RegisteredServiceProvider.cs +++ b/src/Microsoft.SqlTools.Hosting/Extensibility/RegisteredServiceProvider.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Reflection; +using Microsoft.SqlTools.Hosting; using Microsoft.SqlTools.ServiceLayer.Utility; namespace Microsoft.SqlTools.ServiceLayer.Extensibility diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/ClientCapabilities.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Contracts/ClientCapabilities.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/ClientCapabilities.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Contracts/ClientCapabilities.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/HostingErrorEvent.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Contracts/HostingErrorEvent.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/HostingErrorEvent.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Contracts/HostingErrorEvent.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/Initialize.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Contracts/Initialize.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/Initialize.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Contracts/Initialize.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/ServerCapabilities.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Contracts/ServerCapabilities.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/ServerCapabilities.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Contracts/ServerCapabilities.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/Shutdown.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Contracts/Shutdown.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/Shutdown.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Contracts/Shutdown.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/VersionRequest.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Contracts/VersionRequest.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/VersionRequest.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Contracts/VersionRequest.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/IHostedService.cs b/src/Microsoft.SqlTools.Hosting/Hosting/IHostedService.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/IHostedService.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/IHostedService.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Channel/ChannelBase.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Channel/ChannelBase.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Channel/ChannelBase.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Channel/ChannelBase.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Channel/StdioClientChannel.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Channel/StdioClientChannel.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Channel/StdioClientChannel.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Channel/StdioClientChannel.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Channel/StdioServerChannel.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Channel/StdioServerChannel.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Channel/StdioServerChannel.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Channel/StdioServerChannel.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Constants.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Constants.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Constants.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Constants.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Contracts/EventType.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Contracts/EventType.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Contracts/EventType.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Contracts/EventType.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Contracts/Message.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Contracts/Message.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Contracts/Message.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Contracts/Message.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Contracts/RequestType.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Contracts/RequestType.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Contracts/RequestType.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Contracts/RequestType.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/EventContext.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/EventContext.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/EventContext.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/EventContext.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/IEventSender.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/IEventSender.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/IEventSender.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/IEventSender.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/IProtocolEndpoint.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/IProtocolEndpoint.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/IProtocolEndpoint.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/IProtocolEndpoint.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/IRequestSender.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/IRequestSender.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/IRequestSender.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/IRequestSender.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageDispatcher.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageDispatcher.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageDispatcher.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageDispatcher.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageParseException.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageParseException.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageParseException.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageParseException.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageProtocolType.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageProtocolType.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageProtocolType.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageProtocolType.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageReader.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageReader.cs similarity index 99% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageReader.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageReader.cs index 2f36ac3d..392af134 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageReader.cs +++ b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageReader.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.IO; using System.Text; using System.Threading.Tasks; +using Microsoft.SqlTools.Hosting; using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts; using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers; using Microsoft.SqlTools.ServiceLayer.Utility; diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageWriter.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageWriter.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/MessageWriter.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/MessageWriter.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/ProtocolEndpoint.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/ProtocolEndpoint.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/ProtocolEndpoint.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/ProtocolEndpoint.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/RequestContext.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/RequestContext.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/RequestContext.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/RequestContext.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Serializers/IMessageSerializer.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Serializers/IMessageSerializer.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Serializers/IMessageSerializer.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Serializers/IMessageSerializer.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Serializers/JsonRpcMessageSerializer.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Serializers/JsonRpcMessageSerializer.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Serializers/JsonRpcMessageSerializer.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Serializers/JsonRpcMessageSerializer.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Serializers/V8MessageSerializer.cs b/src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Serializers/V8MessageSerializer.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/Protocol/Serializers/V8MessageSerializer.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/Protocol/Serializers/V8MessageSerializer.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHost.cs b/src/Microsoft.SqlTools.Hosting/Hosting/ServiceHost.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHost.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/ServiceHost.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHostBase.cs b/src/Microsoft.SqlTools.Hosting/Hosting/ServiceHostBase.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHostBase.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/ServiceHostBase.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHostEditorOperations.cs b/src/Microsoft.SqlTools.Hosting/Hosting/ServiceHostEditorOperations.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHostEditorOperations.cs rename to src/Microsoft.SqlTools.Hosting/Hosting/ServiceHostEditorOperations.cs diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.Designer.cs b/src/Microsoft.SqlTools.Hosting/Localization/sr.Designer.cs new file mode 100644 index 00000000..73730165 --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.Designer.cs @@ -0,0 +1,953 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.SqlTools.Hosting.Localization { + using System; + using System.Reflection; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class sr { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + internal sr() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.SqlTools.ServiceLayer.Localization.sr", typeof(sr).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to File '{0}' recursively included.. + /// + public static string BatchParser_CircularReference { + get { + return ResourceManager.GetString("BatchParser_CircularReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Missing end comment mark '*/'.. + /// + public static string BatchParser_CommentNotTerminated { + get { + return ResourceManager.GetString("BatchParser_CommentNotTerminated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incorrect syntax was encountered while parsing '{0}'.. + /// + public static string BatchParser_IncorrectSyntax { + get { + return ResourceManager.GetString("BatchParser_IncorrectSyntax", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unclosed quotation mark after the character string.. + /// + public static string BatchParser_StringNotTerminated { + get { + return ResourceManager.GetString("BatchParser_StringNotTerminated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Variable {0} is not defined.. + /// + public static string BatchParser_VariableNotDefined { + get { + return ResourceManager.GetString("BatchParser_VariableNotDefined", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Canceling batch parser wrapper batch execution.. + /// + public static string BatchParserWrapperExecutionEngineBatchCancelling { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineBatchCancelling", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1}. + /// + public static string BatchParserWrapperExecutionEngineBatchMessage { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineBatchMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch parser wrapper execution engine batch ResultSet finished.. + /// + public static string BatchParserWrapperExecutionEngineBatchResultSetFinished { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineBatchResultSetFinished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1}. + /// + public static string BatchParserWrapperExecutionEngineBatchResultSetProcessing { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineBatchResultSetProcessing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SQL Execution error: {0}. + /// + public static string BatchParserWrapperExecutionEngineError { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionEngineError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3}. + /// + public static string BatchParserWrapperExecutionError { + get { + return ResourceManager.GetString("BatchParserWrapperExecutionError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connection details object cannot be null. + /// + public static string ConnectionParamsValidateNullConnection { + get { + return ResourceManager.GetString("ConnectionParamsValidateNullConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OwnerUri cannot be null or empty. + /// + public static string ConnectionParamsValidateNullOwnerUri { + get { + return ResourceManager.GetString("ConnectionParamsValidateNullOwnerUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServerName cannot be null or empty. + /// + public static string ConnectionParamsValidateNullServerName { + get { + return ResourceManager.GetString("ConnectionParamsValidateNullServerName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} cannot be null or empty when using SqlLogin authentication. + /// + public static string ConnectionParamsValidateNullSqlAuth { + get { + return ResourceManager.GetString("ConnectionParamsValidateNullSqlAuth", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connection parameters cannot be null. + /// + public static string ConnectionServiceConnectErrorNullParams { + get { + return ResourceManager.GetString("ConnectionServiceConnectErrorNullParams", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connection canceled. + /// + public static string ConnectionServiceConnectionCanceled { + get { + return ResourceManager.GetString("ConnectionServiceConnectionCanceled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value '{0}' for AuthenticationType. Valid values are 'Integrated' and 'SqlLogin'.. + /// + public static string ConnectionServiceConnStringInvalidAuthType { + get { + return ResourceManager.GetString("ConnectionServiceConnStringInvalidAuthType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value '{0}' for ApplicationIntent. Valid values are 'ReadWrite' and 'ReadOnly'.. + /// + public static string ConnectionServiceConnStringInvalidIntent { + get { + return ResourceManager.GetString("ConnectionServiceConnStringInvalidIntent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SpecifiedUri '{0}' does not have existing connection. + /// + public static string ConnectionServiceListDbErrorNotConnected { + get { + return ResourceManager.GetString("ConnectionServiceListDbErrorNotConnected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OwnerUri cannot be null or empty. + /// + public static string ConnectionServiceListDbErrorNullOwnerUri { + get { + return ResourceManager.GetString("ConnectionServiceListDbErrorNullOwnerUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Win32Credential object is already disposed. + /// + public static string CredentialServiceWin32CredentialDisposed { + get { + return ResourceManager.GetString("CredentialServiceWin32CredentialDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid CriticalHandle!. + /// + public static string CredentialsServiceInvalidCriticalHandle { + get { + return ResourceManager.GetString("CredentialsServiceInvalidCriticalHandle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password has exceeded 512 bytes. + /// + public static string CredentialsServicePasswordLengthExceeded { + get { + return ResourceManager.GetString("CredentialsServicePasswordLengthExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target must be specified to delete a credential. + /// + public static string CredentialsServiceTargetForDelete { + get { + return ResourceManager.GetString("CredentialsServiceTargetForDelete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target must be specified to check existance of a credential. + /// + public static string CredentialsServiceTargetForLookup { + get { + return ResourceManager.GetString("CredentialsServiceTargetForLookup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while the batch was being processed. The error message is: {0}. + /// + public static string EE_BatchError_Exception { + get { + return ResourceManager.GetString("EE_BatchError_Exception", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while the batch was being executed.. + /// + public static string EE_BatchExecutionError_Halting { + get { + return ResourceManager.GetString("EE_BatchExecutionError_Halting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while the batch was being executed, but the error has been ignored.. + /// + public static string EE_BatchExecutionError_Ignoring { + get { + return ResourceManager.GetString("EE_BatchExecutionError_Ignoring", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ({0} row(s) affected). + /// + public static string EE_BatchExecutionInfo_RowsAffected { + get { + return ResourceManager.GetString("EE_BatchExecutionInfo_RowsAffected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Msg {0}, Level {1}, State {2}. + /// + public static string EE_BatchSqlMessageNoLineInfo { + get { + return ResourceManager.GetString("EE_BatchSqlMessageNoLineInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Msg {0}, Level {1}, State {2}, Line {3}. + /// + public static string EE_BatchSqlMessageNoProcedureInfo { + get { + return ResourceManager.GetString("EE_BatchSqlMessageNoProcedureInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4}. + /// + public static string EE_BatchSqlMessageWithProcedureInfo { + get { + return ResourceManager.GetString("EE_BatchSqlMessageWithProcedureInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Command {0} is not supported.. + /// + public static string EE_ExecutionError_CommandNotSupported { + get { + return ResourceManager.GetString("EE_ExecutionError_CommandNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The variable {0} could not be found.. + /// + public static string EE_ExecutionError_VariableNotFound { + get { + return ResourceManager.GetString("EE_ExecutionError_VariableNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execution completed {0} times.... + /// + public static string EE_ExecutionInfo_FinalizingLoop { + get { + return ResourceManager.GetString("EE_ExecutionInfo_FinalizingLoop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting execution loop of {0} times.... + /// + public static string EE_ExecutionInfo_InitilizingLoop { + get { + return ResourceManager.GetString("EE_ExecutionInfo_InitilizingLoop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You cancelled the query.. + /// + public static string EE_ExecutionInfo_QueryCancelledbyUser { + get { + return ResourceManager.GetString("EE_ExecutionInfo_QueryCancelledbyUser", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The previous execution is not yet complete.. + /// + public static string EE_ExecutionNotYetCompleteError { + get { + return ResourceManager.GetString("EE_ExecutionNotYetCompleteError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A scripting error occurred.. + /// + public static string EE_ScriptError_Error { + get { + return ResourceManager.GetString("EE_ScriptError_Error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A fatal error occurred.. + /// + public static string EE_ScriptError_FatalError { + get { + return ResourceManager.GetString("EE_ScriptError_FatalError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incorrect syntax was encountered while {0} was being parsed.. + /// + public static string EE_ScriptError_ParsingSyntax { + get { + return ResourceManager.GetString("EE_ScriptError_ParsingSyntax", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scripting warning.. + /// + public static string EE_ScriptError_Warning { + get { + return ResourceManager.GetString("EE_ScriptError_Warning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replacement of an empty string by an empty string.. + /// + public static string ErrorEmptyStringReplacement { + get { + return ResourceManager.GetString("ErrorEmptyStringReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot convert SqlCodeObject Type {0} to Type {1}. + /// + public static string ErrorUnexpectedCodeObjectType { + get { + return ResourceManager.GetString("ErrorUnexpectedCodeObjectType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message header must separate key and value using ':'. + /// + public static string HostingHeaderMissingColon { + get { + return ResourceManager.GetString("HostingHeaderMissingColon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fatal error: Content-Length header must be provided. + /// + public static string HostingHeaderMissingContentLengthHeader { + get { + return ResourceManager.GetString("HostingHeaderMissingContentLengthHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fatal error: Content-Length value is not an integer. + /// + public static string HostingHeaderMissingContentLengthValue { + get { + return ResourceManager.GetString("HostingHeaderMissingContentLengthValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MessageReader's input stream ended unexpectedly, terminating. + /// + public static string HostingUnexpectedEndOfStream { + get { + return ResourceManager.GetString("HostingUnexpectedEndOfStream", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service of type {0} cannot be created by ExtensionLoader<{1}>. + /// + public static string IncompatibleServiceForExtensionLoader { + get { + return ResourceManager.GetString("IncompatibleServiceForExtensionLoader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple services found for type {0}, expected only 1. + /// + public static string MultipleServicesFound { + get { + return ResourceManager.GetString("MultipleServicesFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This feature is currently not supported on Azure SQL DB and Data Warehouse: {0}. + /// + public static string PeekDefinitionAzureError { + get { + return ResourceManager.GetString("PeekDefinitionAzureError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No database object was retrieved.. + /// + public static string PeekDefinitionDatabaseError { + get { + return ResourceManager.GetString("PeekDefinitionDatabaseError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unexpected error occurred during Peek Definition execution: {0}. + /// + public static string PeekDefinitionError { + get { + return ResourceManager.GetString("PeekDefinitionError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No results were found.. + /// + public static string PeekDefinitionNoResultsError { + get { + return ResourceManager.GetString("PeekDefinitionNoResultsError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to a server.. + /// + public static string PeekDefinitionNotConnectedError { + get { + return ResourceManager.GetString("PeekDefinitionNotConnectedError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation timed out.. + /// + public static string PeekDefinitionTimedoutError { + get { + return ResourceManager.GetString("PeekDefinitionTimedoutError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This object type is currently not supported by this feature.. + /// + public static string PeekDefinitionTypeNotSupportedError { + get { + return ResourceManager.GetString("PeekDefinitionTypeNotSupportedError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (1 row affected). + /// + public static string QueryServiceAffectedOneRow { + get { + return ResourceManager.GetString("QueryServiceAffectedOneRow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ({0} rows affected). + /// + public static string QueryServiceAffectedRows { + get { + return ResourceManager.GetString("QueryServiceAffectedRows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The query has already completed, it cannot be cancelled. + /// + public static string QueryServiceCancelAlreadyCompleted { + get { + return ResourceManager.GetString("QueryServiceCancelAlreadyCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Query successfully cancelled, failed to dispose query. Owner URI not found.. + /// + public static string QueryServiceCancelDisposeFailed { + get { + return ResourceManager.GetString("QueryServiceCancelDisposeFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (No column name). + /// + public static string QueryServiceColumnNull { + get { + return ResourceManager.GetString("QueryServiceColumnNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Commands completed successfully.. + /// + public static string QueryServiceCompletedSuccessfully { + get { + return ResourceManager.GetString("QueryServiceCompletedSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of bytes to return must be greater than zero. + /// + public static string QueryServiceDataReaderByteCountInvalid { + get { + return ResourceManager.GetString("QueryServiceDataReaderByteCountInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of chars to return must be greater than zero. + /// + public static string QueryServiceDataReaderCharCountInvalid { + get { + return ResourceManager.GetString("QueryServiceDataReaderCharCountInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of XML bytes to return must be greater than zero. + /// + public static string QueryServiceDataReaderXmlCountInvalid { + get { + return ResourceManager.GetString("QueryServiceDataReaderXmlCountInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Msg {0}, Level {1}, State {2}, Line {3}{4}{5}. + /// + public static string QueryServiceErrorFormat { + get { + return ResourceManager.GetString("QueryServiceErrorFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not retrieve an execution plan from the result set . + /// + public static string QueryServiceExecutionPlanNotFound { + get { + return ResourceManager.GetString("QueryServiceExecutionPlanNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to FileStreamWrapper must be initialized before performing operations. + /// + public static string QueryServiceFileWrapperNotInitialized { + get { + return ResourceManager.GetString("QueryServiceFileWrapperNotInitialized", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This FileStreamWrapper cannot be used for writing. + /// + public static string QueryServiceFileWrapperReadOnly { + get { + return ResourceManager.GetString("QueryServiceFileWrapperReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Access method cannot be write-only. + /// + public static string QueryServiceFileWrapperWriteOnly { + get { + return ResourceManager.GetString("QueryServiceFileWrapperWriteOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sender for OnInfoMessage event must be a SqlConnection. + /// + public static string QueryServiceMessageSenderNotSql { + get { + return ResourceManager.GetString("QueryServiceMessageSenderNotSql", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Query was canceled by user. + /// + public static string QueryServiceQueryCancelled { + get { + return ResourceManager.GetString("QueryServiceQueryCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Query failed: {0}. + /// + public static string QueryServiceQueryFailed { + get { + return ResourceManager.GetString("QueryServiceQueryFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A query is already in progress for this editor session. Please cancel this query or wait for its completion.. + /// + public static string QueryServiceQueryInProgress { + get { + return ResourceManager.GetString("QueryServiceQueryInProgress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This editor is not connected to a database. + /// + public static string QueryServiceQueryInvalidOwnerUri { + get { + return ResourceManager.GetString("QueryServiceQueryInvalidOwnerUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested query does not exist. + /// + public static string QueryServiceRequestsNoQuery { + get { + return ResourceManager.GetString("QueryServiceRequestsNoQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not retrieve column schema for result set. + /// + public static string QueryServiceResultSetNoColumnSchema { + get { + return ResourceManager.GetString("QueryServiceResultSetNoColumnSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot read subset unless the results have been read from the server. + /// + public static string QueryServiceResultSetNotRead { + get { + return ResourceManager.GetString("QueryServiceResultSetNotRead", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reader cannot be null. + /// + public static string QueryServiceResultSetReaderNull { + get { + return ResourceManager.GetString("QueryServiceResultSetReaderNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Row count must be a positive integer. + /// + public static string QueryServiceResultSetRowCountOutOfRange { + get { + return ResourceManager.GetString("QueryServiceResultSetRowCountOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start row cannot be less than 0 or greater than the number of rows in the result set. + /// + public static string QueryServiceResultSetStartRowOutOfRange { + get { + return ResourceManager.GetString("QueryServiceResultSetStartRowOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to save {0}: {1}. + /// + public static string QueryServiceSaveAsFail { + get { + return ResourceManager.GetString("QueryServiceSaveAsFail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A save request to the same path is in progress. + /// + public static string QueryServiceSaveAsInProgress { + get { + return ResourceManager.GetString("QueryServiceSaveAsInProgress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal error occurred while starting save task. + /// + public static string QueryServiceSaveAsMiscStartingError { + get { + return ResourceManager.GetString("QueryServiceSaveAsMiscStartingError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Result cannot be saved until query execution has completed. + /// + public static string QueryServiceSaveAsResultSetNotComplete { + get { + return ResourceManager.GetString("QueryServiceSaveAsResultSetNotComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The batch has not completed, yet. + /// + public static string QueryServiceSubsetBatchNotCompleted { + get { + return ResourceManager.GetString("QueryServiceSubsetBatchNotCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch index cannot be less than 0 or greater than the number of batches. + /// + public static string QueryServiceSubsetBatchOutOfRange { + get { + return ResourceManager.GetString("QueryServiceSubsetBatchOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Result set index cannot be less than 0 or greater than the number of result sets. + /// + public static string QueryServiceSubsetResultSetOutOfRange { + get { + return ResourceManager.GetString("QueryServiceSubsetResultSetOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot register service for type {0}, one or more services already registered. + /// + public static string ServiceAlreadyRegistered { + get { + return ResourceManager.GetString("ServiceAlreadyRegistered", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} was not found in the service provider. + /// + public static string ServiceNotFound { + get { + return ResourceManager.GetString("ServiceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service of Type {0} is not compatible with registered Type {1}. + /// + public static string ServiceNotOfExpectedType { + get { + return ResourceManager.GetString("ServiceNotOfExpectedType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SetServiceProvider() was not called to establish the required service provider. + /// + public static string ServiceProviderNotSet { + get { + return ResourceManager.GetString("ServiceProviderNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EN_LOCALIZATION. + /// + public static string TestLocalizationConstant { + get { + return ResourceManager.GetString("TestLocalizationConstant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For more information about this error, see the troubleshooting topics in the product documentation.. + /// + public static string TroubleshootingAssistanceMessage { + get { + return ResourceManager.GetString("TroubleshootingAssistanceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start position ({0}, {1}) must come before or be equal to the end position ({2}, {3}). + /// + public static string WorkspaceServiceBufferPositionOutOfOrder { + get { + return ResourceManager.GetString("WorkspaceServiceBufferPositionOutOfOrder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Position is outside of column range for line {0}. + /// + public static string WorkspaceServicePositionColumnOutOfRange { + get { + return ResourceManager.GetString("WorkspaceServicePositionColumnOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Position is outside of file line range. + /// + public static string WorkspaceServicePositionLineOutOfRange { + get { + return ResourceManager.GetString("WorkspaceServicePositionLineOutOfRange", resourceCulture); + } + } + } +} diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.cs b/src/Microsoft.SqlTools.Hosting/Localization/sr.cs new file mode 100755 index 00000000..7ec9a964 --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.cs @@ -0,0 +1,227 @@ +// WARNING: +// This file was generated by the Microsoft DataWarehouse String Resource Tool 1.37.0.0 +// from information in sr.strings +// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN +// +namespace Microsoft.SqlTools.Hosting +{ + using System; + using System.Reflection; + using System.Resources; + using System.Globalization; + + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class SR + { + protected SR() + { } + + public static CultureInfo Culture + { + get + { + return Keys.Culture; + } + set + { + Keys.Culture = value; + } + } + + + public static string CredentialsServiceInvalidCriticalHandle + { + get + { + return Keys.GetString(Keys.CredentialsServiceInvalidCriticalHandle); + } + } + + public static string CredentialsServicePasswordLengthExceeded + { + get + { + return Keys.GetString(Keys.CredentialsServicePasswordLengthExceeded); + } + } + + public static string CredentialsServiceTargetForDelete + { + get + { + return Keys.GetString(Keys.CredentialsServiceTargetForDelete); + } + } + + public static string CredentialsServiceTargetForLookup + { + get + { + return Keys.GetString(Keys.CredentialsServiceTargetForLookup); + } + } + + public static string CredentialServiceWin32CredentialDisposed + { + get + { + return Keys.GetString(Keys.CredentialServiceWin32CredentialDisposed); + } + } + + public static string ServiceAlreadyRegistered + { + get + { + return Keys.GetString(Keys.ServiceAlreadyRegistered); + } + } + + public static string MultipleServicesFound + { + get + { + return Keys.GetString(Keys.MultipleServicesFound); + } + } + + public static string IncompatibleServiceForExtensionLoader + { + get + { + return Keys.GetString(Keys.IncompatibleServiceForExtensionLoader); + } + } + + public static string ServiceProviderNotSet + { + get + { + return Keys.GetString(Keys.ServiceProviderNotSet); + } + } + + public static string ServiceNotFound + { + get + { + return Keys.GetString(Keys.ServiceNotFound); + } + } + + public static string ServiceNotOfExpectedType + { + get + { + return Keys.GetString(Keys.ServiceNotOfExpectedType); + } + } + + public static string HostingUnexpectedEndOfStream + { + get + { + return Keys.GetString(Keys.HostingUnexpectedEndOfStream); + } + } + + public static string HostingHeaderMissingColon + { + get + { + return Keys.GetString(Keys.HostingHeaderMissingColon); + } + } + + public static string HostingHeaderMissingContentLengthHeader + { + get + { + return Keys.GetString(Keys.HostingHeaderMissingContentLengthHeader); + } + } + + public static string HostingHeaderMissingContentLengthValue + { + get + { + return Keys.GetString(Keys.HostingHeaderMissingContentLengthValue); + } + } + + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Keys + { + static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.Hosting.Localization.SR", typeof(SR).GetTypeInfo().Assembly); + + static CultureInfo _culture = null; + + + public const string CredentialsServiceInvalidCriticalHandle = "CredentialsServiceInvalidCriticalHandle"; + + + public const string CredentialsServicePasswordLengthExceeded = "CredentialsServicePasswordLengthExceeded"; + + + public const string CredentialsServiceTargetForDelete = "CredentialsServiceTargetForDelete"; + + + public const string CredentialsServiceTargetForLookup = "CredentialsServiceTargetForLookup"; + + + public const string CredentialServiceWin32CredentialDisposed = "CredentialServiceWin32CredentialDisposed"; + + + public const string ServiceAlreadyRegistered = "ServiceAlreadyRegistered"; + + + public const string MultipleServicesFound = "MultipleServicesFound"; + + + public const string IncompatibleServiceForExtensionLoader = "IncompatibleServiceForExtensionLoader"; + + + public const string ServiceProviderNotSet = "ServiceProviderNotSet"; + + + public const string ServiceNotFound = "ServiceNotFound"; + + + public const string ServiceNotOfExpectedType = "ServiceNotOfExpectedType"; + + + public const string HostingUnexpectedEndOfStream = "HostingUnexpectedEndOfStream"; + + + public const string HostingHeaderMissingColon = "HostingHeaderMissingColon"; + + + public const string HostingHeaderMissingContentLengthHeader = "HostingHeaderMissingContentLengthHeader"; + + + public const string HostingHeaderMissingContentLengthValue = "HostingHeaderMissingContentLengthValue"; + + + private Keys() + { } + + public static CultureInfo Culture + { + get + { + return _culture; + } + set + { + _culture = value; + } + } + + public static string GetString(string key) + { + return resourceManager.GetString(key, _culture); + } + + } + } +} diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.es.resx b/src/Microsoft.SqlTools.Hosting/Localization/sr.es.resx new file mode 100644 index 00000000..f43e5c5e --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.es.resx @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +text/microsoft-resx1.3System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089ES_LOCALIZATION + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.resx b/src/Microsoft.SqlTools.Hosting/Localization/sr.resx new file mode 100755 index 00000000..babafb52 --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.resx @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Invalid CriticalHandle! + + + + The password has exceeded 512 bytes + + + + Target must be specified to delete a credential + + + + Target must be specified to check existance of a credential + + + + Win32Credential object is already disposed + + + + Cannot register service for type {0}, one or more services already registered + + + + Multiple services found for type {0}, expected only 1 + + + + Service of type {0} cannot be created by ExtensionLoader<{1}> + + + + SetServiceProvider() was not called to establish the required service provider + + + + Service {0} was not found in the service provider + + + + Service of Type {0} is not compatible with registered Type {1} + + + + MessageReader's input stream ended unexpectedly, terminating + + + + Message header must separate key and value using ':' + + + + Fatal error: Content-Length header must be provided + + + + Fatal error: Content-Length value is not an integer + + + diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.strings b/src/Microsoft.SqlTools.Hosting/Localization/sr.strings new file mode 100644 index 00000000..37d5e4ec --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.strings @@ -0,0 +1,60 @@ +# String resource file +# +# When processed by the String Resource Tool, this file generates +# both a .CS and a .RESX file with the same name as the file. +# The .CS file contains a class which can be used to access these +# string resources, including the ability to format in +# parameters, which are identified with the .NET {x} format +# (see String.Format help). +# +# Comments below assume the file name is SR.strings. +# +# Lines starting with a semicolon ";" are also treated as comments, but +# in a future version they will be extracted and made available in LocStudio +# Put your comments to localizers _before_ the string they apply to. +# +# SMO build specific comment +# after generating the .resx file, run srgen on it and get the .resx file +# please remember to also check that .resx in, along with the +# .strings and .cs files + +[strings] + +############################################################################ +# Credentials Service + +CredentialsServiceInvalidCriticalHandle = Invalid CriticalHandle! + +CredentialsServicePasswordLengthExceeded = The password has exceeded 512 bytes + +CredentialsServiceTargetForDelete = Target must be specified to delete a credential + +CredentialsServiceTargetForLookup = Target must be specified to check existance of a credential + +CredentialServiceWin32CredentialDisposed = Win32Credential object is already disposed + +############################################################################ +# Extensibility + +ServiceAlreadyRegistered = Cannot register service for type {0}, one or more services already registered + +MultipleServicesFound = Multiple services found for type {0}, expected only 1 + +IncompatibleServiceForExtensionLoader = Service of type {0} cannot be created by ExtensionLoader<{1}> + +ServiceProviderNotSet = SetServiceProvider() was not called to establish the required service provider + +ServiceNotFound = Service {0} was not found in the service provider + +ServiceNotOfExpectedType = Service of Type {0} is not compatible with registered Type {1} + +############################################################################ +# Hosting + +HostingUnexpectedEndOfStream = MessageReader's input stream ended unexpectedly, terminating + +HostingHeaderMissingColon = Message header must separate key and value using ':' + +HostingHeaderMissingContentLengthHeader = Fatal error: Content-Length header must be provided + +HostingHeaderMissingContentLengthValue = Fatal error: Content-Length value is not an integer diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.xlf b/src/Microsoft.SqlTools.Hosting/Localization/sr.xlf new file mode 100644 index 00000000..eb98421f --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.xlf @@ -0,0 +1,82 @@ + + + + + + Invalid CriticalHandle! + Invalid CriticalHandle! + + + + The password has exceeded 512 bytes + The password has exceeded 512 bytes + + + + Target must be specified to delete a credential + Target must be specified to delete a credential + + + + Target must be specified to check existance of a credential + Target must be specified to check existance of a credential + + + + Win32Credential object is already disposed + Win32Credential object is already disposed + + + + MessageReader's input stream ended unexpectedly, terminating + MessageReader's input stream ended unexpectedly, terminating + + + + Message header must separate key and value using ':' + Message header must separate key and value using ':' + + + + Fatal error: Content-Length header must be provided + Fatal error: Content-Length header must be provided + + + + Fatal error: Content-Length value is not an integer + Fatal error: Content-Length value is not an integer + + + + Cannot register service for type {0}, one or more services already registered + Cannot register service for type {0}, one or more services already registered + + + + Multiple services found for type {0}, expected only 1 + Multiple services found for type {0}, expected only 1 + + + + Service of type {0} cannot be created by ExtensionLoader<{1}> + Service of type {0} cannot be created by ExtensionLoader<{1}> + + + + SetServiceProvider() was not called to establish the required service provider + SetServiceProvider() was not called to establish the required service provider + + + + Service {0} was not found in the service provider + Service {0} was not found in the service provider + + + + Service of Type {0} is not compatible with registered Type {1} + Service of Type {0} is not compatible with registered Type {1} + + + + + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.Hosting/Localization/transXliff/sr.es.xlf b/src/Microsoft.SqlTools.Hosting/Localization/transXliff/sr.es.xlf new file mode 100644 index 00000000..3860e1bf --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Localization/transXliff/sr.es.xlf @@ -0,0 +1,12 @@ + + + + + + ES_LOCALIZATION + ES_LOCALIZATION + + + + + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.xproj b/src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.xproj new file mode 100644 index 00000000..c96f9b1f --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.xproj @@ -0,0 +1,19 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + {2D61DC2B-DA66-441D-B9D0-919198F780F9} + Microsoft.SqlTools.Hosting + .\obj + .\bin\ + v4.5.2 + + + 2.0 + + + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.Hosting/Properties/AssemblyInfo.cs b/src/Microsoft.SqlTools.Hosting/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..4189a9a9 --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/Properties/AssemblyInfo.cs @@ -0,0 +1,46 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SqlTools Hosting Library")] +[assembly: AssemblyDescription("Provides hosting services for SqlTools applications.")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("SqlTools Hosting Library")] +[assembly: AssemblyCopyright("� Microsoft Corporation. All rights reserved.")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6ECAFE73-131A-4221-AA13-C9BDE07FD92B")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyInformationalVersion("1.0.0.0")] + +[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.Test")] +[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.IntegrationTests")] +[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.Test.Common")] diff --git a/src/Microsoft.SqlTools.ServiceLayer/SqlContext/HostDetails.cs b/src/Microsoft.SqlTools.Hosting/SqlContext/HostDetails.cs similarity index 99% rename from src/Microsoft.SqlTools.ServiceLayer/SqlContext/HostDetails.cs rename to src/Microsoft.SqlTools.Hosting/SqlContext/HostDetails.cs index 9a2b6e3d..fe0fba99 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/SqlContext/HostDetails.cs +++ b/src/Microsoft.SqlTools.Hosting/SqlContext/HostDetails.cs @@ -25,7 +25,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext /// The default host ID for SqlTools Editor Services. Used /// for the host-specific profile path if no host ID is specified. /// - public const string DefaultHostProfileId = "Microsoft.SqlToolsServiceHost"; + public const string DefaultHostProfileId = "Microsoft.SqlTools.Hosting"; /// /// The default host version for SqlTools Editor Services. If diff --git a/src/Microsoft.SqlTools.ServiceLayer/SqlContext/SqlToolsContext.cs b/src/Microsoft.SqlTools.Hosting/SqlContext/SqlToolsContext.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/SqlContext/SqlToolsContext.cs rename to src/Microsoft.SqlTools.Hosting/SqlContext/SqlToolsContext.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/AsyncContext.cs b/src/Microsoft.SqlTools.Hosting/Utility/AsyncContext.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/AsyncContext.cs rename to src/Microsoft.SqlTools.Hosting/Utility/AsyncContext.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/AsyncContextThread.cs b/src/Microsoft.SqlTools.Hosting/Utility/AsyncContextThread.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/AsyncContextThread.cs rename to src/Microsoft.SqlTools.Hosting/Utility/AsyncContextThread.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/AsyncLock.cs b/src/Microsoft.SqlTools.Hosting/Utility/AsyncLock.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/AsyncLock.cs rename to src/Microsoft.SqlTools.Hosting/Utility/AsyncLock.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/AsyncQueue.cs b/src/Microsoft.SqlTools.Hosting/Utility/AsyncQueue.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/AsyncQueue.cs rename to src/Microsoft.SqlTools.Hosting/Utility/AsyncQueue.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/Extensions.cs b/src/Microsoft.SqlTools.Hosting/Utility/Extensions.cs similarity index 95% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/Extensions.cs rename to src/Microsoft.SqlTools.Hosting/Utility/Extensions.cs index b19c359f..f6306a17 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Utility/Extensions.cs +++ b/src/Microsoft.SqlTools.Hosting/Utility/Extensions.cs @@ -7,7 +7,7 @@ using System; namespace Microsoft.SqlTools.ServiceLayer.Utility { - internal static class ObjectExtensions + public static class ObjectExtensions { /// /// Extension to evaluate an object's ToString() method in an exception safe way. This will @@ -40,7 +40,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility } } - internal static class NullableExtensions + public static class NullableExtensions { /// /// Extension method to evaluate a bool? and determine if it has the value and is true. diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/Logger.cs b/src/Microsoft.SqlTools.Hosting/Utility/Logger.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/Logger.cs rename to src/Microsoft.SqlTools.Hosting/Utility/Logger.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/LongList.cs b/src/Microsoft.SqlTools.Hosting/Utility/LongList.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/LongList.cs rename to src/Microsoft.SqlTools.Hosting/Utility/LongList.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/TextUtilities.cs b/src/Microsoft.SqlTools.Hosting/Utility/TextUtilities.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/TextUtilities.cs rename to src/Microsoft.SqlTools.Hosting/Utility/TextUtilities.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/ThreadSynchronizationContext.cs b/src/Microsoft.SqlTools.Hosting/Utility/ThreadSynchronizationContext.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/ThreadSynchronizationContext.cs rename to src/Microsoft.SqlTools.Hosting/Utility/ThreadSynchronizationContext.cs diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/Validate.cs b/src/Microsoft.SqlTools.Hosting/Utility/Validate.cs similarity index 100% rename from src/Microsoft.SqlTools.ServiceLayer/Utility/Validate.cs rename to src/Microsoft.SqlTools.Hosting/Utility/Validate.cs diff --git a/src/Microsoft.SqlTools.Hosting/project.json b/src/Microsoft.SqlTools.Hosting/project.json new file mode 100644 index 00000000..fcc42f13 --- /dev/null +++ b/src/Microsoft.SqlTools.Hosting/project.json @@ -0,0 +1,59 @@ +{ + "name": "Microsoft.SqlTools.Hosting", + "version": "1.0.0-*", + "buildOptions": { + "debugType": "portable", + "emitEntryPoint": false + }, + "configurations": { + "Integration": { + "buildOptions": { + "define": [ + "WINDOWS_ONLY_BUILD" + ], + "emitEntryPoint": false + } + } + }, + "dependencies": { + "Newtonsoft.Json": "9.0.1", + "System.Collections.Specialized": "4.0.1", + "System.ComponentModel.TypeConverter": "4.1.0", + "System.Diagnostics.Contracts": "4.0.1", + "System.Diagnostics.TraceSource": "4.0.0", + "NETStandard.Library": "1.6.0", + "Microsoft.NETCore.Runtime.CoreCLR": "1.0.2", + "Microsoft.NETCore.DotNetHostPolicy": "1.0.1", + "Microsoft.DiaSymReader.Native": "1.4.1", + "System.Diagnostics.Process": "4.1.0", + "System.Threading.Thread": "4.0.0", + "System.Runtime.Loader": "4.0.0", + "System.Composition.Runtime": "1.0.31", + "System.Composition.Convention": "1.0.31", + "System.Composition.TypedParts": "1.0.31", + "Microsoft.Extensions.DependencyModel": "1.0.0", + "System.Runtime": "4.3.0" + }, + "frameworks": { + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": { + "version": "1.0.0" + } + }, + "imports": "dnxcore50" + } + }, + "runtimes": { + "win7-x64": {}, + "win7-x86": {}, + "osx.10.11-x64": {}, + "ubuntu.14.04-x64": {}, + "ubuntu.16.04-x64": {}, + "centos.7-x64": {}, + "rhel.7.2-x64": {}, + "debian.8-x64": {}, + "fedora.23-x64": {}, + "opensuse.13.2-x64": {} + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs old mode 100644 new mode 100755 index cd92d993..337cd3c6 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs @@ -1,934 +1,814 @@ -// WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 1.37.0.0 -// from information in sr.strings -// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN -// -namespace Microsoft.SqlTools.ServiceLayer -{ - using System; - using System.Reflection; - using System.Resources; - using System.Globalization; - - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class SR - { - protected SR() - { } - - public static CultureInfo Culture - { - get - { - return Keys.Culture; - } - set - { - Keys.Culture = value; - } - } - - - public static string ConnectionServiceConnectErrorNullParams - { - get - { - return Keys.GetString(Keys.ConnectionServiceConnectErrorNullParams); - } - } - - public static string ConnectionServiceListDbErrorNullOwnerUri - { - get - { - return Keys.GetString(Keys.ConnectionServiceListDbErrorNullOwnerUri); - } - } - - public static string ConnectionServiceConnectionCanceled - { - get - { - return Keys.GetString(Keys.ConnectionServiceConnectionCanceled); - } - } - - public static string ConnectionParamsValidateNullOwnerUri - { - get - { - return Keys.GetString(Keys.ConnectionParamsValidateNullOwnerUri); - } - } - - public static string ConnectionParamsValidateNullConnection - { - get - { - return Keys.GetString(Keys.ConnectionParamsValidateNullConnection); - } - } - - public static string ConnectionParamsValidateNullServerName - { - get - { - return Keys.GetString(Keys.ConnectionParamsValidateNullServerName); - } - } - - public static string CredentialsServiceInvalidCriticalHandle - { - get - { - return Keys.GetString(Keys.CredentialsServiceInvalidCriticalHandle); - } - } - - public static string CredentialsServicePasswordLengthExceeded - { - get - { - return Keys.GetString(Keys.CredentialsServicePasswordLengthExceeded); - } - } - - public static string CredentialsServiceTargetForDelete - { - get - { - return Keys.GetString(Keys.CredentialsServiceTargetForDelete); - } - } - - public static string CredentialsServiceTargetForLookup - { - get - { - return Keys.GetString(Keys.CredentialsServiceTargetForLookup); - } - } - - public static string CredentialServiceWin32CredentialDisposed - { - get - { - return Keys.GetString(Keys.CredentialServiceWin32CredentialDisposed); - } - } - - public static string ServiceAlreadyRegistered - { - get - { - return Keys.GetString(Keys.ServiceAlreadyRegistered); - } - } - - public static string MultipleServicesFound - { - get - { - return Keys.GetString(Keys.MultipleServicesFound); - } - } - - public static string IncompatibleServiceForExtensionLoader - { - get - { - return Keys.GetString(Keys.IncompatibleServiceForExtensionLoader); - } - } - - public static string ServiceProviderNotSet - { - get - { - return Keys.GetString(Keys.ServiceProviderNotSet); - } - } - - public static string ServiceNotFound - { - get - { - return Keys.GetString(Keys.ServiceNotFound); - } - } - - public static string ServiceNotOfExpectedType - { - get - { - return Keys.GetString(Keys.ServiceNotOfExpectedType); - } - } - - public static string ErrorUnexpectedCodeObjectType - { - get - { - return Keys.GetString(Keys.ErrorUnexpectedCodeObjectType); - } - } - - public static string HostingUnexpectedEndOfStream - { - get - { - return Keys.GetString(Keys.HostingUnexpectedEndOfStream); - } - } - - public static string HostingHeaderMissingColon - { - get - { - return Keys.GetString(Keys.HostingHeaderMissingColon); - } - } - - public static string HostingHeaderMissingContentLengthHeader - { - get - { - return Keys.GetString(Keys.HostingHeaderMissingContentLengthHeader); - } - } - - public static string HostingHeaderMissingContentLengthValue - { - get - { - return Keys.GetString(Keys.HostingHeaderMissingContentLengthValue); - } - } - - public static string QueryServiceCancelAlreadyCompleted - { - get - { - return Keys.GetString(Keys.QueryServiceCancelAlreadyCompleted); - } - } - - public static string QueryServiceCancelDisposeFailed - { - get - { - return Keys.GetString(Keys.QueryServiceCancelDisposeFailed); - } - } - - public static string QueryServiceQueryCancelled - { - get - { - return Keys.GetString(Keys.QueryServiceQueryCancelled); - } - } - - public static string QueryServiceSubsetBatchNotCompleted - { - get - { - return Keys.GetString(Keys.QueryServiceSubsetBatchNotCompleted); - } - } - - public static string QueryServiceSubsetBatchOutOfRange - { - get - { - return Keys.GetString(Keys.QueryServiceSubsetBatchOutOfRange); - } - } - - public static string QueryServiceSubsetResultSetOutOfRange - { - get - { - return Keys.GetString(Keys.QueryServiceSubsetResultSetOutOfRange); - } - } - - public static string QueryServiceDataReaderByteCountInvalid - { - get - { - return Keys.GetString(Keys.QueryServiceDataReaderByteCountInvalid); - } - } - - public static string QueryServiceDataReaderCharCountInvalid - { - get - { - return Keys.GetString(Keys.QueryServiceDataReaderCharCountInvalid); - } - } - - public static string QueryServiceDataReaderXmlCountInvalid - { - get - { - return Keys.GetString(Keys.QueryServiceDataReaderXmlCountInvalid); - } - } - - public static string QueryServiceFileWrapperWriteOnly - { - get - { - return Keys.GetString(Keys.QueryServiceFileWrapperWriteOnly); - } - } - - public static string QueryServiceFileWrapperNotInitialized - { - get - { - return Keys.GetString(Keys.QueryServiceFileWrapperNotInitialized); - } - } - - public static string QueryServiceFileWrapperReadOnly - { - get - { - return Keys.GetString(Keys.QueryServiceFileWrapperReadOnly); - } - } - - public static string QueryServiceAffectedOneRow - { - get - { - return Keys.GetString(Keys.QueryServiceAffectedOneRow); - } - } - - public static string QueryServiceCompletedSuccessfully - { - get - { - return Keys.GetString(Keys.QueryServiceCompletedSuccessfully); - } - } - - public static string QueryServiceColumnNull - { - get - { - return Keys.GetString(Keys.QueryServiceColumnNull); - } - } - - public static string QueryServiceRequestsNoQuery - { - get - { - return Keys.GetString(Keys.QueryServiceRequestsNoQuery); - } - } - - public static string QueryServiceQueryInvalidOwnerUri - { - get - { - return Keys.GetString(Keys.QueryServiceQueryInvalidOwnerUri); - } - } - - public static string QueryServiceQueryInProgress - { - get - { - return Keys.GetString(Keys.QueryServiceQueryInProgress); - } - } - - public static string QueryServiceMessageSenderNotSql - { - get - { - return Keys.GetString(Keys.QueryServiceMessageSenderNotSql); - } - } - - public static string QueryServiceResultSetReaderNull - { - get - { - return Keys.GetString(Keys.QueryServiceResultSetReaderNull); - } - } - - public static string QueryServiceSaveAsResultSetNotComplete - { - get - { - return Keys.GetString(Keys.QueryServiceSaveAsResultSetNotComplete); - } - } - - public static string QueryServiceSaveAsMiscStartingError - { - get - { - return Keys.GetString(Keys.QueryServiceSaveAsMiscStartingError); - } - } - - public static string QueryServiceSaveAsInProgress - { - get - { - return Keys.GetString(Keys.QueryServiceSaveAsInProgress); - } - } - - public static string QueryServiceResultSetNotRead - { - get - { - return Keys.GetString(Keys.QueryServiceResultSetNotRead); - } - } - - public static string QueryServiceResultSetStartRowOutOfRange - { - get - { - return Keys.GetString(Keys.QueryServiceResultSetStartRowOutOfRange); - } - } - - public static string QueryServiceResultSetRowCountOutOfRange - { - get - { - return Keys.GetString(Keys.QueryServiceResultSetRowCountOutOfRange); - } - } - - public static string QueryServiceResultSetNoColumnSchema - { - get - { - return Keys.GetString(Keys.QueryServiceResultSetNoColumnSchema); - } - } - - public static string QueryServiceExecutionPlanNotFound - { - get - { - return Keys.GetString(Keys.QueryServiceExecutionPlanNotFound); - } - } - - public static string PeekDefinitionNoResultsError - { - get - { - return Keys.GetString(Keys.PeekDefinitionNoResultsError); - } - } - - public static string PeekDefinitionDatabaseError - { - get - { - return Keys.GetString(Keys.PeekDefinitionDatabaseError); - } - } - - public static string PeekDefinitionNotConnectedError - { - get - { - return Keys.GetString(Keys.PeekDefinitionNotConnectedError); - } - } - - public static string PeekDefinitionTimedoutError - { - get - { - return Keys.GetString(Keys.PeekDefinitionTimedoutError); - } - } - - public static string PeekDefinitionTypeNotSupportedError - { - get - { - return Keys.GetString(Keys.PeekDefinitionTypeNotSupportedError); - } - } - - public static string ErrorEmptyStringReplacement - { - get - { - return Keys.GetString(Keys.ErrorEmptyStringReplacement); - } - } - - public static string WorkspaceServicePositionLineOutOfRange - { - get - { - return Keys.GetString(Keys.WorkspaceServicePositionLineOutOfRange); - } - } - - public static string EditDataSessionNotFound - { - get - { - return Keys.GetString(Keys.EditDataSessionNotFound); - } - } - - public static string EditDataQueryNotCompleted - { - get - { - return Keys.GetString(Keys.EditDataQueryNotCompleted); - } - } - - public static string EditDataQueryImproperResultSets - { - get - { - return Keys.GetString(Keys.EditDataQueryImproperResultSets); - } - } - - public static string EditDataFailedAddRow - { - get - { - return Keys.GetString(Keys.EditDataFailedAddRow); - } - } - - public static string EditDataRowOutOfRange - { - get - { - return Keys.GetString(Keys.EditDataRowOutOfRange); - } - } - - public static string EditDataUpdatePending - { - get - { - return Keys.GetString(Keys.EditDataUpdatePending); - } - } - - public static string EditDataUpdateNotPending - { - get - { - return Keys.GetString(Keys.EditDataUpdateNotPending); - } - } - - public static string EditDataObjectMetadataNotFound - { - get - { - return Keys.GetString(Keys.EditDataObjectMetadataNotFound); - } - } - - public static string EditDataInvalidFormatBinary - { - get - { - return Keys.GetString(Keys.EditDataInvalidFormatBinary); - } - } - - public static string EditDataInvalidFormatBoolean - { - get - { - return Keys.GetString(Keys.EditDataInvalidFormatBoolean); - } - } - - public static string EditDataCreateScriptMissingValue - { - get - { - return Keys.GetString(Keys.EditDataCreateScriptMissingValue); - } - } - - public static string EditDataDeleteSetCell - { - get - { - return Keys.GetString(Keys.EditDataDeleteSetCell); - } - } - - public static string EditDataColumnIdOutOfRange - { - get - { - return Keys.GetString(Keys.EditDataColumnIdOutOfRange); - } - } - - public static string EditDataColumnCannotBeEdited - { - get - { - return Keys.GetString(Keys.EditDataColumnCannotBeEdited); - } - } - - public static string EditDataColumnNoKeyColumns - { - get - { - return Keys.GetString(Keys.EditDataColumnNoKeyColumns); - } - } - - public static string EditDataScriptFilePathNull - { - get - { - return Keys.GetString(Keys.EditDataScriptFilePathNull); - } - } - - public static string EE_BatchSqlMessageNoProcedureInfo - { - get - { - return Keys.GetString(Keys.EE_BatchSqlMessageNoProcedureInfo); - } - } - - public static string EE_BatchSqlMessageWithProcedureInfo - { - get - { - return Keys.GetString(Keys.EE_BatchSqlMessageWithProcedureInfo); - } - } - - public static string EE_BatchSqlMessageNoLineInfo - { - get - { - return Keys.GetString(Keys.EE_BatchSqlMessageNoLineInfo); - } - } - - public static string EE_BatchError_Exception - { - get - { - return Keys.GetString(Keys.EE_BatchError_Exception); - } - } - - public static string EE_BatchExecutionInfo_RowsAffected - { - get - { - return Keys.GetString(Keys.EE_BatchExecutionInfo_RowsAffected); - } - } - - public static string EE_ExecutionNotYetCompleteError - { - get - { - return Keys.GetString(Keys.EE_ExecutionNotYetCompleteError); - } - } - - public static string EE_ScriptError_Error - { - get - { - return Keys.GetString(Keys.EE_ScriptError_Error); - } - } - - public static string EE_ScriptError_ParsingSyntax - { - get - { - return Keys.GetString(Keys.EE_ScriptError_ParsingSyntax); - } - } - - public static string EE_ScriptError_FatalError - { - get - { - return Keys.GetString(Keys.EE_ScriptError_FatalError); - } - } - - public static string EE_ExecutionInfo_FinalizingLoop - { - get - { - return Keys.GetString(Keys.EE_ExecutionInfo_FinalizingLoop); - } - } - - public static string EE_ExecutionInfo_QueryCancelledbyUser - { - get - { - return Keys.GetString(Keys.EE_ExecutionInfo_QueryCancelledbyUser); - } - } - - public static string EE_BatchExecutionError_Halting - { - get - { - return Keys.GetString(Keys.EE_BatchExecutionError_Halting); - } - } - - public static string EE_BatchExecutionError_Ignoring - { - get - { - return Keys.GetString(Keys.EE_BatchExecutionError_Ignoring); - } - } - - public static string EE_ExecutionInfo_InitilizingLoop - { - get - { - return Keys.GetString(Keys.EE_ExecutionInfo_InitilizingLoop); - } - } - - public static string EE_ExecutionError_CommandNotSupported - { - get - { - return Keys.GetString(Keys.EE_ExecutionError_CommandNotSupported); - } - } - - public static string EE_ExecutionError_VariableNotFound - { - get - { - return Keys.GetString(Keys.EE_ExecutionError_VariableNotFound); - } - } - - public static string BatchParserWrapperExecutionEngineError - { - get - { - return Keys.GetString(Keys.BatchParserWrapperExecutionEngineError); - } - } - - public static string BatchParserWrapperExecutionError - { - get - { - return Keys.GetString(Keys.BatchParserWrapperExecutionError); - } - } - - public static string BatchParserWrapperExecutionEngineBatchMessage - { - get - { - return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchMessage); - } - } - - public static string BatchParserWrapperExecutionEngineBatchResultSetProcessing - { - get - { - return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchResultSetProcessing); - } - } - - public static string BatchParserWrapperExecutionEngineBatchResultSetFinished - { - get - { - return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchResultSetFinished); - } - } - - public static string BatchParserWrapperExecutionEngineBatchCancelling - { - get - { - return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchCancelling); - } - } - - public static string EE_ScriptError_Warning - { - get - { - return Keys.GetString(Keys.EE_ScriptError_Warning); - } - } - - public static string TroubleshootingAssistanceMessage - { - get - { - return Keys.GetString(Keys.TroubleshootingAssistanceMessage); - } - } - - public static string BatchParser_CircularReference - { - get - { - return Keys.GetString(Keys.BatchParser_CircularReference); - } - } - - public static string BatchParser_CommentNotTerminated - { - get - { - return Keys.GetString(Keys.BatchParser_CommentNotTerminated); - } - } - - public static string BatchParser_StringNotTerminated - { - get - { - return Keys.GetString(Keys.BatchParser_StringNotTerminated); - } - } - - public static string BatchParser_IncorrectSyntax - { - get - { - return Keys.GetString(Keys.BatchParser_IncorrectSyntax); - } - } - - public static string BatchParser_VariableNotDefined - { - get - { - return Keys.GetString(Keys.BatchParser_VariableNotDefined); - } - } - - public static string TestLocalizationConstant - { - get - { - return Keys.GetString(Keys.TestLocalizationConstant); - } - } - - public static string ConnectionServiceListDbErrorNotConnected(string uri) - { - return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri); - } - - public static string ConnectionServiceDbErrorDefaultNotConnected(string uri) - { - return Keys.GetString(Keys.ConnectionServiceDbErrorDefaultNotConnected, uri); - } - - public static string ConnectionServiceConnStringInvalidAuthType(string authType) - { - return Keys.GetString(Keys.ConnectionServiceConnStringInvalidAuthType, authType); - } - - public static string ConnectionServiceConnStringInvalidIntent(string intent) - { - return Keys.GetString(Keys.ConnectionServiceConnStringInvalidIntent, intent); - } - - public static string ConnectionParamsValidateNullSqlAuth(string component) - { - return Keys.GetString(Keys.ConnectionParamsValidateNullSqlAuth, component); - } - - public static string QueryServiceAffectedRows(long rows) - { - return Keys.GetString(Keys.QueryServiceAffectedRows, rows); - } - - public static string QueryServiceErrorFormat(int msg, int lvl, int state, int line, string newLine, string message) - { - return Keys.GetString(Keys.QueryServiceErrorFormat, msg, lvl, state, line, newLine, message); - } - - public static string QueryServiceQueryFailed(string message) - { - return Keys.GetString(Keys.QueryServiceQueryFailed, message); - } - - public static string QueryServiceSaveAsFail(string fileName, string message) - { - return Keys.GetString(Keys.QueryServiceSaveAsFail, fileName, message); - } - - public static string PeekDefinitionAzureError(string errorMessage) - { - return Keys.GetString(Keys.PeekDefinitionAzureError, errorMessage); - } - - public static string PeekDefinitionError(string errorMessage) - { - return Keys.GetString(Keys.PeekDefinitionError, errorMessage); - } - - public static string WorkspaceServicePositionColumnOutOfRange(int line) - { - return Keys.GetString(Keys.WorkspaceServicePositionColumnOutOfRange, line); - } - - public static string WorkspaceServiceBufferPositionOutOfOrder(int sLine, int sCol, int eLine, int eCol) - { - return Keys.GetString(Keys.WorkspaceServiceBufferPositionOutOfOrder, sLine, sCol, eLine, eCol); - } - - public static string EditDataUnsupportedObjectType(string typeName) - { - return Keys.GetString(Keys.EditDataUnsupportedObjectType, typeName); - } - - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Keys - { - static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.ServiceLayer.Localization.SR", typeof(SR).GetTypeInfo().Assembly); - - static CultureInfo _culture = null; +// WARNING: +// This file was generated by the Microsoft DataWarehouse String Resource Tool 1.37.0.0 +// from information in sr.strings +// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN +// +namespace Microsoft.SqlTools.ServiceLayer +{ + using System; + using System.Reflection; + using System.Resources; + using System.Globalization; + + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class SR + { + protected SR() + { } + + public static CultureInfo Culture + { + get + { + return Keys.Culture; + } + set + { + Keys.Culture = value; + } + } + + + public static string ConnectionServiceConnectErrorNullParams + { + get + { + return Keys.GetString(Keys.ConnectionServiceConnectErrorNullParams); + } + } + + public static string ConnectionServiceListDbErrorNullOwnerUri + { + get + { + return Keys.GetString(Keys.ConnectionServiceListDbErrorNullOwnerUri); + } + } + + public static string ConnectionServiceConnectionCanceled + { + get + { + return Keys.GetString(Keys.ConnectionServiceConnectionCanceled); + } + } + + public static string ConnectionParamsValidateNullOwnerUri + { + get + { + return Keys.GetString(Keys.ConnectionParamsValidateNullOwnerUri); + } + } + + public static string ConnectionParamsValidateNullConnection + { + get + { + return Keys.GetString(Keys.ConnectionParamsValidateNullConnection); + } + } + + public static string ConnectionParamsValidateNullServerName + { + get + { + return Keys.GetString(Keys.ConnectionParamsValidateNullServerName); + } + } + + public static string ErrorUnexpectedCodeObjectType + { + get + { + return Keys.GetString(Keys.ErrorUnexpectedCodeObjectType); + } + } + + public static string QueryServiceCancelAlreadyCompleted + { + get + { + return Keys.GetString(Keys.QueryServiceCancelAlreadyCompleted); + } + } + + public static string QueryServiceCancelDisposeFailed + { + get + { + return Keys.GetString(Keys.QueryServiceCancelDisposeFailed); + } + } + + public static string QueryServiceQueryCancelled + { + get + { + return Keys.GetString(Keys.QueryServiceQueryCancelled); + } + } + + public static string QueryServiceSubsetBatchNotCompleted + { + get + { + return Keys.GetString(Keys.QueryServiceSubsetBatchNotCompleted); + } + } + + public static string QueryServiceSubsetBatchOutOfRange + { + get + { + return Keys.GetString(Keys.QueryServiceSubsetBatchOutOfRange); + } + } + + public static string QueryServiceSubsetResultSetOutOfRange + { + get + { + return Keys.GetString(Keys.QueryServiceSubsetResultSetOutOfRange); + } + } + + public static string QueryServiceDataReaderByteCountInvalid + { + get + { + return Keys.GetString(Keys.QueryServiceDataReaderByteCountInvalid); + } + } + + public static string QueryServiceDataReaderCharCountInvalid + { + get + { + return Keys.GetString(Keys.QueryServiceDataReaderCharCountInvalid); + } + } + + public static string QueryServiceDataReaderXmlCountInvalid + { + get + { + return Keys.GetString(Keys.QueryServiceDataReaderXmlCountInvalid); + } + } + + public static string QueryServiceFileWrapperWriteOnly + { + get + { + return Keys.GetString(Keys.QueryServiceFileWrapperWriteOnly); + } + } + + public static string QueryServiceFileWrapperNotInitialized + { + get + { + return Keys.GetString(Keys.QueryServiceFileWrapperNotInitialized); + } + } + + public static string QueryServiceFileWrapperReadOnly + { + get + { + return Keys.GetString(Keys.QueryServiceFileWrapperReadOnly); + } + } + + public static string QueryServiceAffectedOneRow + { + get + { + return Keys.GetString(Keys.QueryServiceAffectedOneRow); + } + } + + public static string QueryServiceCompletedSuccessfully + { + get + { + return Keys.GetString(Keys.QueryServiceCompletedSuccessfully); + } + } + + public static string QueryServiceColumnNull + { + get + { + return Keys.GetString(Keys.QueryServiceColumnNull); + } + } + + public static string QueryServiceRequestsNoQuery + { + get + { + return Keys.GetString(Keys.QueryServiceRequestsNoQuery); + } + } + + public static string QueryServiceQueryInvalidOwnerUri + { + get + { + return Keys.GetString(Keys.QueryServiceQueryInvalidOwnerUri); + } + } + + public static string QueryServiceQueryInProgress + { + get + { + return Keys.GetString(Keys.QueryServiceQueryInProgress); + } + } + + public static string QueryServiceMessageSenderNotSql + { + get + { + return Keys.GetString(Keys.QueryServiceMessageSenderNotSql); + } + } + + public static string QueryServiceResultSetReaderNull + { + get + { + return Keys.GetString(Keys.QueryServiceResultSetReaderNull); + } + } + + public static string QueryServiceSaveAsResultSetNotComplete + { + get + { + return Keys.GetString(Keys.QueryServiceSaveAsResultSetNotComplete); + } + } + + public static string QueryServiceSaveAsMiscStartingError + { + get + { + return Keys.GetString(Keys.QueryServiceSaveAsMiscStartingError); + } + } + + public static string QueryServiceSaveAsInProgress + { + get + { + return Keys.GetString(Keys.QueryServiceSaveAsInProgress); + } + } + + public static string QueryServiceResultSetNotRead + { + get + { + return Keys.GetString(Keys.QueryServiceResultSetNotRead); + } + } + + public static string QueryServiceResultSetStartRowOutOfRange + { + get + { + return Keys.GetString(Keys.QueryServiceResultSetStartRowOutOfRange); + } + } + + public static string QueryServiceResultSetRowCountOutOfRange + { + get + { + return Keys.GetString(Keys.QueryServiceResultSetRowCountOutOfRange); + } + } + + public static string QueryServiceResultSetNoColumnSchema + { + get + { + return Keys.GetString(Keys.QueryServiceResultSetNoColumnSchema); + } + } + + public static string QueryServiceExecutionPlanNotFound + { + get + { + return Keys.GetString(Keys.QueryServiceExecutionPlanNotFound); + } + } + + public static string PeekDefinitionNoResultsError + { + get + { + return Keys.GetString(Keys.PeekDefinitionNoResultsError); + } + } + + public static string PeekDefinitionDatabaseError + { + get + { + return Keys.GetString(Keys.PeekDefinitionDatabaseError); + } + } + + public static string PeekDefinitionNotConnectedError + { + get + { + return Keys.GetString(Keys.PeekDefinitionNotConnectedError); + } + } + + public static string PeekDefinitionTimedoutError + { + get + { + return Keys.GetString(Keys.PeekDefinitionTimedoutError); + } + } + + public static string PeekDefinitionTypeNotSupportedError + { + get + { + return Keys.GetString(Keys.PeekDefinitionTypeNotSupportedError); + } + } + + public static string ErrorEmptyStringReplacement + { + get + { + return Keys.GetString(Keys.ErrorEmptyStringReplacement); + } + } + + public static string WorkspaceServicePositionLineOutOfRange + { + get + { + return Keys.GetString(Keys.WorkspaceServicePositionLineOutOfRange); + } + } + + public static string EditDataSessionNotFound + { + get + { + return Keys.GetString(Keys.EditDataSessionNotFound); + } + } + + public static string EditDataQueryNotCompleted + { + get + { + return Keys.GetString(Keys.EditDataQueryNotCompleted); + } + } + + public static string EditDataQueryImproperResultSets + { + get + { + return Keys.GetString(Keys.EditDataQueryImproperResultSets); + } + } + + public static string EditDataFailedAddRow + { + get + { + return Keys.GetString(Keys.EditDataFailedAddRow); + } + } + + public static string EditDataRowOutOfRange + { + get + { + return Keys.GetString(Keys.EditDataRowOutOfRange); + } + } + + public static string EditDataUpdatePending + { + get + { + return Keys.GetString(Keys.EditDataUpdatePending); + } + } + + public static string EditDataUpdateNotPending + { + get + { + return Keys.GetString(Keys.EditDataUpdateNotPending); + } + } + + public static string EditDataObjectMetadataNotFound + { + get + { + return Keys.GetString(Keys.EditDataObjectMetadataNotFound); + } + } + + public static string EditDataInvalidFormatBinary + { + get + { + return Keys.GetString(Keys.EditDataInvalidFormatBinary); + } + } + + public static string EditDataInvalidFormatBoolean + { + get + { + return Keys.GetString(Keys.EditDataInvalidFormatBoolean); + } + } + + public static string EditDataCreateScriptMissingValue + { + get + { + return Keys.GetString(Keys.EditDataCreateScriptMissingValue); + } + } + + public static string EditDataDeleteSetCell + { + get + { + return Keys.GetString(Keys.EditDataDeleteSetCell); + } + } + + public static string EditDataColumnIdOutOfRange + { + get + { + return Keys.GetString(Keys.EditDataColumnIdOutOfRange); + } + } + + public static string EditDataColumnCannotBeEdited + { + get + { + return Keys.GetString(Keys.EditDataColumnCannotBeEdited); + } + } + + public static string EditDataColumnNoKeyColumns + { + get + { + return Keys.GetString(Keys.EditDataColumnNoKeyColumns); + } + } + + public static string EditDataScriptFilePathNull + { + get + { + return Keys.GetString(Keys.EditDataScriptFilePathNull); + } + } + + public static string EE_BatchSqlMessageNoProcedureInfo + { + get + { + return Keys.GetString(Keys.EE_BatchSqlMessageNoProcedureInfo); + } + } + + public static string EE_BatchSqlMessageWithProcedureInfo + { + get + { + return Keys.GetString(Keys.EE_BatchSqlMessageWithProcedureInfo); + } + } + + public static string EE_BatchSqlMessageNoLineInfo + { + get + { + return Keys.GetString(Keys.EE_BatchSqlMessageNoLineInfo); + } + } + + public static string EE_BatchError_Exception + { + get + { + return Keys.GetString(Keys.EE_BatchError_Exception); + } + } + + public static string EE_BatchExecutionInfo_RowsAffected + { + get + { + return Keys.GetString(Keys.EE_BatchExecutionInfo_RowsAffected); + } + } + + public static string EE_ExecutionNotYetCompleteError + { + get + { + return Keys.GetString(Keys.EE_ExecutionNotYetCompleteError); + } + } + + public static string EE_ScriptError_Error + { + get + { + return Keys.GetString(Keys.EE_ScriptError_Error); + } + } + + public static string EE_ScriptError_ParsingSyntax + { + get + { + return Keys.GetString(Keys.EE_ScriptError_ParsingSyntax); + } + } + + public static string EE_ScriptError_FatalError + { + get + { + return Keys.GetString(Keys.EE_ScriptError_FatalError); + } + } + + public static string EE_ExecutionInfo_FinalizingLoop + { + get + { + return Keys.GetString(Keys.EE_ExecutionInfo_FinalizingLoop); + } + } + + public static string EE_ExecutionInfo_QueryCancelledbyUser + { + get + { + return Keys.GetString(Keys.EE_ExecutionInfo_QueryCancelledbyUser); + } + } + + public static string EE_BatchExecutionError_Halting + { + get + { + return Keys.GetString(Keys.EE_BatchExecutionError_Halting); + } + } + + public static string EE_BatchExecutionError_Ignoring + { + get + { + return Keys.GetString(Keys.EE_BatchExecutionError_Ignoring); + } + } + + public static string EE_ExecutionInfo_InitilizingLoop + { + get + { + return Keys.GetString(Keys.EE_ExecutionInfo_InitilizingLoop); + } + } + + public static string EE_ExecutionError_CommandNotSupported + { + get + { + return Keys.GetString(Keys.EE_ExecutionError_CommandNotSupported); + } + } + + public static string EE_ExecutionError_VariableNotFound + { + get + { + return Keys.GetString(Keys.EE_ExecutionError_VariableNotFound); + } + } + + public static string BatchParserWrapperExecutionEngineError + { + get + { + return Keys.GetString(Keys.BatchParserWrapperExecutionEngineError); + } + } + + public static string BatchParserWrapperExecutionError + { + get + { + return Keys.GetString(Keys.BatchParserWrapperExecutionError); + } + } + + public static string BatchParserWrapperExecutionEngineBatchMessage + { + get + { + return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchMessage); + } + } + + public static string BatchParserWrapperExecutionEngineBatchResultSetProcessing + { + get + { + return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchResultSetProcessing); + } + } + + public static string BatchParserWrapperExecutionEngineBatchResultSetFinished + { + get + { + return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchResultSetFinished); + } + } + + public static string BatchParserWrapperExecutionEngineBatchCancelling + { + get + { + return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchCancelling); + } + } + + public static string EE_ScriptError_Warning + { + get + { + return Keys.GetString(Keys.EE_ScriptError_Warning); + } + } + + public static string TroubleshootingAssistanceMessage + { + get + { + return Keys.GetString(Keys.TroubleshootingAssistanceMessage); + } + } + + public static string BatchParser_CircularReference + { + get + { + return Keys.GetString(Keys.BatchParser_CircularReference); + } + } + + public static string BatchParser_CommentNotTerminated + { + get + { + return Keys.GetString(Keys.BatchParser_CommentNotTerminated); + } + } + + public static string BatchParser_StringNotTerminated + { + get + { + return Keys.GetString(Keys.BatchParser_StringNotTerminated); + } + } + + public static string BatchParser_IncorrectSyntax + { + get + { + return Keys.GetString(Keys.BatchParser_IncorrectSyntax); + } + } + + public static string BatchParser_VariableNotDefined + { + get + { + return Keys.GetString(Keys.BatchParser_VariableNotDefined); + } + } + + public static string TestLocalizationConstant + { + get + { + return Keys.GetString(Keys.TestLocalizationConstant); + } + } + + public static string ConnectionServiceListDbErrorNotConnected(string uri) + { + return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri); + } + + public static string ConnectionServiceDbErrorDefaultNotConnected(string uri) + { + return Keys.GetString(Keys.ConnectionServiceDbErrorDefaultNotConnected, uri); + } + + public static string ConnectionServiceConnStringInvalidAuthType(string authType) + { + return Keys.GetString(Keys.ConnectionServiceConnStringInvalidAuthType, authType); + } + + public static string ConnectionServiceConnStringInvalidIntent(string intent) + { + return Keys.GetString(Keys.ConnectionServiceConnStringInvalidIntent, intent); + } + + public static string ConnectionParamsValidateNullSqlAuth(string component) + { + return Keys.GetString(Keys.ConnectionParamsValidateNullSqlAuth, component); + } + + public static string QueryServiceAffectedRows(long rows) + { + return Keys.GetString(Keys.QueryServiceAffectedRows, rows); + } + + public static string QueryServiceErrorFormat(int msg, int lvl, int state, int line, string newLine, string message) + { + return Keys.GetString(Keys.QueryServiceErrorFormat, msg, lvl, state, line, newLine, message); + } + + public static string QueryServiceQueryFailed(string message) + { + return Keys.GetString(Keys.QueryServiceQueryFailed, message); + } + + public static string QueryServiceSaveAsFail(string fileName, string message) + { + return Keys.GetString(Keys.QueryServiceSaveAsFail, fileName, message); + } + + public static string PeekDefinitionAzureError(string errorMessage) + { + return Keys.GetString(Keys.PeekDefinitionAzureError, errorMessage); + } + + public static string PeekDefinitionError(string errorMessage) + { + return Keys.GetString(Keys.PeekDefinitionError, errorMessage); + } + + public static string WorkspaceServicePositionColumnOutOfRange(int line) + { + return Keys.GetString(Keys.WorkspaceServicePositionColumnOutOfRange, line); + } + + public static string WorkspaceServiceBufferPositionOutOfOrder(int sLine, int sCol, int eLine, int eCol) + { + return Keys.GetString(Keys.WorkspaceServiceBufferPositionOutOfOrder, sLine, sCol, eLine, eCol); + } + + public static string EditDataUnsupportedObjectType(string typeName) + { + return Keys.GetString(Keys.EditDataUnsupportedObjectType, typeName); + } + + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Keys + { + static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.ServiceLayer.Localization.SR", typeof(SR).GetTypeInfo().Assembly); + + static CultureInfo _culture = null; public const string ConnectionServiceConnectErrorNullParams = "ConnectionServiceConnectErrorNullParams"; @@ -964,54 +844,9 @@ namespace Microsoft.SqlTools.ServiceLayer public const string ConnectionParamsValidateNullSqlAuth = "ConnectionParamsValidateNullSqlAuth"; - public const string CredentialsServiceInvalidCriticalHandle = "CredentialsServiceInvalidCriticalHandle"; - - - public const string CredentialsServicePasswordLengthExceeded = "CredentialsServicePasswordLengthExceeded"; - - - public const string CredentialsServiceTargetForDelete = "CredentialsServiceTargetForDelete"; - - - public const string CredentialsServiceTargetForLookup = "CredentialsServiceTargetForLookup"; - - - public const string CredentialServiceWin32CredentialDisposed = "CredentialServiceWin32CredentialDisposed"; - - - public const string ServiceAlreadyRegistered = "ServiceAlreadyRegistered"; - - - public const string MultipleServicesFound = "MultipleServicesFound"; - - - public const string IncompatibleServiceForExtensionLoader = "IncompatibleServiceForExtensionLoader"; - - - public const string ServiceProviderNotSet = "ServiceProviderNotSet"; - - - public const string ServiceNotFound = "ServiceNotFound"; - - - public const string ServiceNotOfExpectedType = "ServiceNotOfExpectedType"; - - public const string ErrorUnexpectedCodeObjectType = "ErrorUnexpectedCodeObjectType"; - public const string HostingUnexpectedEndOfStream = "HostingUnexpectedEndOfStream"; - - - public const string HostingHeaderMissingColon = "HostingHeaderMissingColon"; - - - public const string HostingHeaderMissingContentLengthHeader = "HostingHeaderMissingContentLengthHeader"; - - - public const string HostingHeaderMissingContentLengthValue = "HostingHeaderMissingContentLengthValue"; - - public const string QueryServiceCancelAlreadyCompleted = "QueryServiceCancelAlreadyCompleted"; @@ -1281,50 +1116,50 @@ namespace Microsoft.SqlTools.ServiceLayer public const string TestLocalizationConstant = "TestLocalizationConstant"; + + private Keys() + { } + + public static CultureInfo Culture + { + get + { + return _culture; + } + set + { + _culture = value; + } + } + + public static string GetString(string key) + { + return resourceManager.GetString(key, _culture); + } - private Keys() - { } + + public static string GetString(string key, object arg0) + { + return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0); + } - public static CultureInfo Culture - { - get - { - return _culture; - } - set - { - _culture = value; - } - } + + public static string GetString(string key, object arg0, object arg1) + { + return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1); + } - public static string GetString(string key) - { - return resourceManager.GetString(key, _culture); - } + + public static string GetString(string key, object arg0, object arg1, object arg2, object arg3) + { + return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2, arg3); + } - - public static string GetString(string key, object arg0) - { - return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0); - } - - - public static string GetString(string key, object arg0, object arg1) - { - return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1); - } - - - public static string GetString(string key, object arg0, object arg1, object arg2, object arg3) - { - return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2, arg3); - } - - - public static string GetString(string key, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) - { - return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2, arg3, arg4, arg5); - } + + public static string GetString(string key, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) + { + return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2, arg3, arg4, arg5); + } } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx index d65a6f96..f43e5c5e 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx @@ -1,96 +1,18 @@  - - - - - - - - - - - - - - - - - - - - + - @@ -105,19 +27,5 @@ - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ES_LOCALIZATION - - \ No newline at end of file +text/microsoft-resx1.3System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089ES_LOCALIZATION + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx old mode 100644 new mode 100755 index 551681e1..30ff168c --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx @@ -1,602 +1,542 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Connection parameters cannot be null - - - - OwnerUri cannot be null or empty - - - - SpecifiedUri '{0}' does not have existing connection - . - Parameters: 0 - uri (string) - - - Specified URI '{0}' does not have a default connection - . - Parameters: 0 - uri (string) - - - Invalid value '{0}' for AuthenticationType. Valid values are 'Integrated' and 'SqlLogin'. - . - Parameters: 0 - authType (string) - - - Invalid value '{0}' for ApplicationIntent. Valid values are 'ReadWrite' and 'ReadOnly'. - . - Parameters: 0 - intent (string) - - - Connection canceled - - - - OwnerUri cannot be null or empty - - - - Connection details object cannot be null - - - - ServerName cannot be null or empty - - - - {0} cannot be null or empty when using SqlLogin authentication - . - Parameters: 0 - component (string) - - - Invalid CriticalHandle! - - - - The password has exceeded 512 bytes - - - - Target must be specified to delete a credential - - - - Target must be specified to check existance of a credential - - - - Win32Credential object is already disposed - - - - Cannot register service for type {0}, one or more services already registered - - - - Multiple services found for type {0}, expected only 1 - - - - Service of type {0} cannot be created by ExtensionLoader<{1}> - - - - SetServiceProvider() was not called to establish the required service provider - - - - Service {0} was not found in the service provider - - - - Service of Type {0} is not compatible with registered Type {1} - - - - Cannot convert SqlCodeObject Type {0} to Type {1} - - - - MessageReader's input stream ended unexpectedly, terminating - - - - Message header must separate key and value using ':' - - - - Fatal error: Content-Length header must be provided - - - - Fatal error: Content-Length value is not an integer - - - - The query has already completed, it cannot be cancelled - - - - Query successfully cancelled, failed to dispose query. Owner URI not found. - - - - Query was canceled by user - - - - The batch has not completed, yet - - - - Batch index cannot be less than 0 or greater than the number of batches - - - - Result set index cannot be less than 0 or greater than the number of result sets - - - - Maximum number of bytes to return must be greater than zero - - - - Maximum number of chars to return must be greater than zero - - - - Maximum number of XML bytes to return must be greater than zero - - - - Access method cannot be write-only - - - - FileStreamWrapper must be initialized before performing operations - - - - This FileStreamWrapper cannot be used for writing - - - - (1 row affected) - - - - ({0} rows affected) - . - Parameters: 0 - rows (long) - - - Commands completed successfully. - - - - Msg {0}, Level {1}, State {2}, Line {3}{4}{5} - . - Parameters: 0 - msg (int), 1 - lvl (int), 2 - state (int), 3 - line (int), 4 - newLine (string), 5 - message (string) - - - Query failed: {0} - . - Parameters: 0 - message (string) - - - (No column name) - - - - The requested query does not exist - - - - This editor is not connected to a database - - - - A query is already in progress for this editor session. Please cancel this query or wait for its completion. - - - - Sender for OnInfoMessage event must be a SqlConnection - - - - Reader cannot be null - - - - Result cannot be saved until query execution has completed - - - - Internal error occurred while starting save task - - - - A save request to the same path is in progress - - - - Failed to save {0}: {1} - . - Parameters: 0 - fileName (string), 1 - message (string) - - - Cannot read subset unless the results have been read from the server - - - - Start row cannot be less than 0 or greater than the number of rows in the result set - - - - Row count must be a positive integer - - - - Could not retrieve column schema for result set - - - - Could not retrieve an execution plan from the result set - - - - This feature is currently not supported on Azure SQL DB and Data Warehouse: {0} - . - Parameters: 0 - errorMessage (string) - - - An unexpected error occurred during Peek Definition execution: {0} - . - Parameters: 0 - errorMessage (string) - - - No results were found. - - - - No database object was retrieved. - - - - Please connect to a server. - - - - Operation timed out. - - - - This object type is currently not supported by this feature. - - - - Replacement of an empty string by an empty string. - - - - Position is outside of file line range - - - - Position is outside of column range for line {0} - . - Parameters: 0 - line (int) - - - Start position ({0}, {1}) must come before or be equal to the end position ({2}, {3}) - . - Parameters: 0 - sLine (int), 1 - sCol (int), 2 - eLine (int), 3 - eCol (int) - - - Edit session does not exist. - - - - Database object {0} cannot be used for editing. - . - Parameters: 0 - typeName (string) - - - Query has not completed execution - - - - Query did not generate exactly one result set - - - - Failed to add new row to update cache - - - - Given row ID is outside the range of rows in the edit cache - - - - An update is already pending for this row and must be reverted first - - - - Given row ID does not have pending updated - - - - Table or view metadata could not be found - - - - Invalid format for binary column - - - - Allowed values for boolean columns are 0, 1, "true", or "false" - - - - A required cell value is missing - - - - A delete is pending for this row, a cell update cannot be applied. - - - - Column ID must be in the range of columns for the query - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Connection parameters cannot be null + + + + OwnerUri cannot be null or empty + + + + SpecifiedUri '{0}' does not have existing connection + . + Parameters: 0 - uri (string) + + + Specified URI '{0}' does not have a default connection + . + Parameters: 0 - uri (string) + + + Invalid value '{0}' for AuthenticationType. Valid values are 'Integrated' and 'SqlLogin'. + . + Parameters: 0 - authType (string) + + + Invalid value '{0}' for ApplicationIntent. Valid values are 'ReadWrite' and 'ReadOnly'. + . + Parameters: 0 - intent (string) + + + Connection canceled + + + + OwnerUri cannot be null or empty + + + + Connection details object cannot be null + + + + ServerName cannot be null or empty + + + + {0} cannot be null or empty when using SqlLogin authentication + . + Parameters: 0 - component (string) + + + Cannot convert SqlCodeObject Type {0} to Type {1} + + + + The query has already completed, it cannot be cancelled + + + + Query successfully cancelled, failed to dispose query. Owner URI not found. + + + + Query was canceled by user + + + + The batch has not completed, yet + + + + Batch index cannot be less than 0 or greater than the number of batches + + + + Result set index cannot be less than 0 or greater than the number of result sets + + + + Maximum number of bytes to return must be greater than zero + + + + Maximum number of chars to return must be greater than zero + + + + Maximum number of XML bytes to return must be greater than zero + + + + Access method cannot be write-only + + + + FileStreamWrapper must be initialized before performing operations + + + + This FileStreamWrapper cannot be used for writing + + + + (1 row affected) + + + + ({0} rows affected) + . + Parameters: 0 - rows (long) + + + Commands completed successfully. + + + + Msg {0}, Level {1}, State {2}, Line {3}{4}{5} + . + Parameters: 0 - msg (int), 1 - lvl (int), 2 - state (int), 3 - line (int), 4 - newLine (string), 5 - message (string) + + + Query failed: {0} + . + Parameters: 0 - message (string) + + + (No column name) + + + + The requested query does not exist + + + + This editor is not connected to a database + + + + A query is already in progress for this editor session. Please cancel this query or wait for its completion. + + + + Sender for OnInfoMessage event must be a SqlConnection + + + + Reader cannot be null + + + + Result cannot be saved until query execution has completed + + + + Internal error occurred while starting save task + + + + A save request to the same path is in progress + + + + Failed to save {0}: {1} + . + Parameters: 0 - fileName (string), 1 - message (string) + + + Cannot read subset unless the results have been read from the server + + + + Start row cannot be less than 0 or greater than the number of rows in the result set + + + + Row count must be a positive integer + + + + Could not retrieve column schema for result set + + + + Could not retrieve an execution plan from the result set + + + + This feature is currently not supported on Azure SQL DB and Data Warehouse: {0} + . + Parameters: 0 - errorMessage (string) + + + An unexpected error occurred during Peek Definition execution: {0} + . + Parameters: 0 - errorMessage (string) + + + No results were found. + + + + No database object was retrieved. + + + + Please connect to a server. + + + + Operation timed out. + + + + This object type is currently not supported by this feature. + + + + Replacement of an empty string by an empty string. + + + + Position is outside of file line range + + + + Position is outside of column range for line {0} + . + Parameters: 0 - line (int) + + + Start position ({0}, {1}) must come before or be equal to the end position ({2}, {3}) + . + Parameters: 0 - sLine (int), 1 - sCol (int), 2 - eLine (int), 3 - eCol (int) + + + Edit session does not exist. + + + + Database object {0} cannot be used for editing. + . + Parameters: 0 - typeName (string) + + + Query has not completed execution + + + + Query did not generate exactly one result set + + + + Failed to add new row to update cache + + + + Given row ID is outside the range of rows in the edit cache + + + + An update is already pending for this row and must be reverted first + + + + Given row ID does not have pending updated + + + + Table or view metadata could not be found + + + + Invalid format for binary column + + + + Allowed values for boolean columns are 0, 1, "true", or "false" + + + + A required cell value is missing + + + + A delete is pending for this row, a cell update cannot be applied. + + + + Column ID must be in the range of columns for the query + - - Column cannot be edited - + + Column cannot be edited + - - No key columns were found - + + No key columns were found + - - An output filename must be provided - + + An output filename must be provided + - - Msg {0}, Level {1}, State {2}, Line {3} - + + Msg {0}, Level {1}, State {2}, Line {3} + - - Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4} - + + Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4} + - - Msg {0}, Level {1}, State {2} - + + Msg {0}, Level {1}, State {2} + - - An error occurred while the batch was being processed. The error message is: {0} - + + An error occurred while the batch was being processed. The error message is: {0} + - - ({0} row(s) affected) - - - - The previous execution is not yet complete. - - - - A scripting error occurred. - - - - Incorrect syntax was encountered while {0} was being parsed. - - - - A fatal error occurred. - - - - Execution completed {0} times... - + + ({0} row(s) affected) + + + + The previous execution is not yet complete. + + + + A scripting error occurred. + + + + Incorrect syntax was encountered while {0} was being parsed. + + + + A fatal error occurred. + + + + Execution completed {0} times... + - - You cancelled the query. - + + You cancelled the query. + - - An error occurred while the batch was being executed. - + + An error occurred while the batch was being executed. + - - An error occurred while the batch was being executed, but the error has been ignored. - + + An error occurred while the batch was being executed, but the error has been ignored. + - - Starting execution loop of {0} times... - + + Starting execution loop of {0} times... + - - Command {0} is not supported. - + + Command {0} is not supported. + - - The variable {0} could not be found. - + + The variable {0} could not be found. + - - SQL Execution error: {0} - + + SQL Execution error: {0} + - - Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3} - + + Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3} + - - Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1} - + + Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1} + - - Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1} - + + Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1} + - - Batch parser wrapper execution engine batch ResultSet finished. - + + Batch parser wrapper execution engine batch ResultSet finished. + - - Canceling batch parser wrapper batch execution. - + + Canceling batch parser wrapper batch execution. + - - Scripting warning. - + + Scripting warning. + - - For more information about this error, see the troubleshooting topics in the product documentation. - + + For more information about this error, see the troubleshooting topics in the product documentation. + - - File '{0}' recursively included. - + + File '{0}' recursively included. + - - Missing end comment mark '*/'. - + + Missing end comment mark '*/'. + - - Unclosed quotation mark after the character string. - + + Unclosed quotation mark after the character string. + - - Incorrect syntax was encountered while parsing '{0}'. - + + Incorrect syntax was encountered while parsing '{0}'. + - - Variable {0} is not defined. - + + Variable {0} is not defined. + - - EN_LOCALIZATION - + + EN_LOCALIZATION + diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings index f9c17744..52b3d24f 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings @@ -48,50 +48,11 @@ ConnectionParamsValidateNullServerName = ServerName cannot be null or empty ConnectionParamsValidateNullSqlAuth(string component) = {0} cannot be null or empty when using SqlLogin authentication -############################################################################ -# Credentials Service - -CredentialsServiceInvalidCriticalHandle = Invalid CriticalHandle! - -CredentialsServicePasswordLengthExceeded = The password has exceeded 512 bytes - -CredentialsServiceTargetForDelete = Target must be specified to delete a credential - -CredentialsServiceTargetForLookup = Target must be specified to check existance of a credential - -CredentialServiceWin32CredentialDisposed = Win32Credential object is already disposed - -############################################################################ -# Extensibility - -ServiceAlreadyRegistered = Cannot register service for type {0}, one or more services already registered - -MultipleServicesFound = Multiple services found for type {0}, expected only 1 - -IncompatibleServiceForExtensionLoader = Service of type {0} cannot be created by ExtensionLoader<{1}> - -ServiceProviderNotSet = SetServiceProvider() was not called to establish the required service provider - -ServiceNotFound = Service {0} was not found in the service provider - -ServiceNotOfExpectedType = Service of Type {0} is not compatible with registered Type {1} - ############################################################################ # Formatter ErrorUnexpectedCodeObjectType = Cannot convert SqlCodeObject Type {0} to Type {1} -############################################################################ -# Hosting - -HostingUnexpectedEndOfStream = MessageReader's input stream ended unexpectedly, terminating - -HostingHeaderMissingColon = Message header must separate key and value using ':' - -HostingHeaderMissingContentLengthHeader = Fatal error: Content-Length header must be provided - -HostingHeaderMissingContentLengthValue = Fatal error: Content-Length value is not an integer - ############################################################################ # Query Execution Service diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf index ea569eb8..3af5e24e 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf @@ -56,51 +56,6 @@ . Parameters: 0 - component (string) - - Invalid CriticalHandle! - Invalid CriticalHandle! - - - - The password has exceeded 512 bytes - The password has exceeded 512 bytes - - - - Target must be specified to delete a credential - Target must be specified to delete a credential - - - - Target must be specified to check existance of a credential - Target must be specified to check existance of a credential - - - - Win32Credential object is already disposed - Win32Credential object is already disposed - - - - MessageReader's input stream ended unexpectedly, terminating - MessageReader's input stream ended unexpectedly, terminating - - - - Message header must separate key and value using ':' - Message header must separate key and value using ':' - - - - Fatal error: Content-Length header must be provided - Fatal error: Content-Length header must be provided - - - - Fatal error: Content-Length value is not an integer - Fatal error: Content-Length value is not an integer - - The query has already completed, it cannot be cancelled The query has already completed, it cannot be cancelled @@ -469,36 +424,6 @@ EN_LOCALIZATION - - Cannot register service for type {0}, one or more services already registered - Cannot register service for type {0}, one or more services already registered - - - - Multiple services found for type {0}, expected only 1 - Multiple services found for type {0}, expected only 1 - - - - Service of type {0} cannot be created by ExtensionLoader<{1}> - Service of type {0} cannot be created by ExtensionLoader<{1}> - - - - SetServiceProvider() was not called to establish the required service provider - SetServiceProvider() was not called to establish the required service provider - - - - Service {0} was not found in the service provider - Service {0} was not found in the service provider - - - - Service of Type {0} is not compatible with registered Type {1} - Service of Type {0} is not compatible with registered Type {1} - - Cannot convert SqlCodeObject Type {0} to Type {1} Cannot convert SqlCodeObject Type {0} to Type {1} @@ -595,6 +520,12 @@ . Parameters: 0 - typeName (string) + + Specified URI '{0}' does not have a default connection + Specified URI '{0}' does not have a default connection + . + Parameters: 0 - uri (string) + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/CommandOptions.cs b/src/Microsoft.SqlTools.ServiceLayer/Utility/CommandOptions.cs index b22349e5..57eda1a9 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Utility/CommandOptions.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Utility/CommandOptions.cs @@ -45,7 +45,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility EnableLogging = true; break; case "-locale": - setLocale(argProperty); + SetLocale(argProperty); break; case "h": case "-help": @@ -109,7 +109,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility } } - private void setLocale(string locale){ + private void SetLocale(string locale) + { try { // Creating cultureInfo from our given locale diff --git a/src/Microsoft.SqlTools.ServiceLayer/project.json b/src/Microsoft.SqlTools.ServiceLayer/project.json index 7ac6dd0d..654b498a 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/project.json +++ b/src/Microsoft.SqlTools.ServiceLayer/project.json @@ -33,7 +33,13 @@ "System.Threading.Thread": "4.0.0", "System.Runtime.Loader": "4.0.0", "System.Composition": "1.0.31-beta-24326-02", - "Microsoft.Extensions.DependencyModel": "1.0.0" + "Microsoft.Extensions.DependencyModel": "1.0.0", + "Microsoft.SqlTools.Hosting": { + "target": "project" + }, + "Microsoft.SqlTools.Credentials": { + "target": "project" + } }, "frameworks": { "netcoreapp1.0": { diff --git a/test/CodeCoverage/codecoverage.bat b/test/CodeCoverage/codecoverage.bat index 2dae0247..b9a97aac 100644 --- a/test/CodeCoverage/codecoverage.bat +++ b/test/CodeCoverage/codecoverage.bat @@ -10,6 +10,8 @@ COPY /Y %WORKINGDIR%..\..\src\Microsoft.SqlTools.ServiceLayer\project.json %WORK REM switch PDB type to Full since that is required by OpenCover for now REM we should remove this step on OpenCover supports portable PDB +cscript /nologo ReplaceText.vbs %WORKINGDIR%..\..\src\Microsoft.SqlTools.Credentials\project.json portable full +cscript /nologo ReplaceText.vbs %WORKINGDIR%..\..\src\Microsoft.SqlTools.Hosting\project.json portable full cscript /nologo ReplaceText.vbs %WORKINGDIR%..\..\src\Microsoft.SqlTools.ServiceLayer\project.json portable full REM rebuild the SqlToolsService project @@ -45,4 +47,9 @@ SET SERVICECODECOVERAGE=FALSE REM restore original project.json COPY /Y %WORKINGDIR%..\..\src\Microsoft.SqlTools.ServiceLayer\project.json.BAK %WORKINGDIR%..\..\src\Microsoft.SqlTools.ServiceLayer\project.json DEL %WORKINGDIR%..\..\src\Microsoft.SqlTools.ServiceLayer\project.json.BAK +COPY /Y %WORKINGDIR%..\..\src\Microsoft.SqlTools.Credentials\project.json.BAK %WORKINGDIR%..\..\src\Microsoft.SqlTools.Credentials\project.json +DEL %WORKINGDIR%..\..\src\Microsoft.SqlTools.Credentials\project.json.BAK +COPY /Y %WORKINGDIR%..\..\src\Microsoft.SqlTools.Hosting\project.json.BAK %WORKINGDIR%..\..\src\Microsoft.SqlTools.Hosting\project.json +DEL %WORKINGDIR%..\..\src\Microsoft.SqlTools.Hosting\project.json.BAK + EXIT diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/project.json b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/project.json index 9644d367..00ec3df0 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/project.json +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/project.json @@ -26,6 +26,12 @@ "Microsoft.SqlTools.ServiceLayer": { "target": "project" }, + "Microsoft.SqlTools.Hosting": { + "target": "project" + }, + "Microsoft.SqlTools.Credentials": { + "target": "project" + }, "Moq": "4.6.36-alpha", "Microsoft.SqlTools.ServiceLayer.Test": "1.0.0-*" }, diff --git a/test/Microsoft.SqlTools.ServiceLayer.PerfTests/project.json b/test/Microsoft.SqlTools.ServiceLayer.PerfTests/project.json index 4a796ee2..6be26702 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.PerfTests/project.json +++ b/test/Microsoft.SqlTools.ServiceLayer.PerfTests/project.json @@ -11,6 +11,12 @@ "Microsoft.SqlTools.ServiceLayer": { "target": "project" }, + "Microsoft.SqlTools.Hosting": { + "target": "project" + }, + "Microsoft.SqlTools.Credentials": { + "target": "project" + }, "Microsoft.SqlTools.ServiceLayer.TestDriver": "1.0.0-*", "Microsoft.SqlTools.ServiceLayer.Test.Common": "1.0.0-*" }, diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/project.json b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/project.json index 8c18a1fa..7009e24b 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/project.json +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/project.json @@ -25,6 +25,12 @@ "Microsoft.SqlTools.ServiceLayer": { "target": "project" }, + "Microsoft.SqlTools.Hosting": { + "target": "project" + }, + "Microsoft.SqlTools.Credentials": { + "target": "project" + }, "Moq": "4.6.36-alpha", "Microsoft.SqlTools.ServiceLayer.TestDriver": "1.0.0-*" }, diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/Extensibility/ExtensionTests.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/Extensibility/ExtensionTests.cs index 009c0531..bca97a77 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/Extensibility/ExtensionTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/Extensibility/ExtensionTests.cs @@ -29,28 +29,27 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Extensibility } [Fact] - public void CreateDefaultLoaderShouldOnlyFindTypesInMainAssembly() + public void CreateDefaultLoaderShouldFindTypesOnlyInMainAssembly() { // Given a store created using CreateDefaultLoader - // Then should not find exports from a different assembly + // Then not should find exports from a different assembly ExtensionStore store = ExtensionStore.CreateDefaultLoader(); Assert.Equal(0, store.GetExports().Count()); - // But should find exports that are defined in the main assembly + // And should not find exports that are defined in the ServiceLayer assembly store = ExtensionStore.CreateDefaultLoader(); - Assert.NotEmpty(store.GetExports()); + Assert.Empty(store.GetExports()); } - [Fact] - public void CreateDefaultServiceProviderShouldOnlyFindTypesInMainAssembly() + public void CreateDefaultServiceProviderShouldFindTypesInAllAssemblies() { // Given a default ExtensionServiceProvider // Then should not find exports from a different assembly ExtensionServiceProvider serviceProvider = ExtensionServiceProvider.CreateDefaultServiceProvider(); - Assert.Empty(serviceProvider.GetServices()); + Assert.NotEmpty(serviceProvider.GetServices()); - // But should find exports that are defined in the main assembly + // But should find exports that are defined in the main assembly Assert.NotEmpty(serviceProvider.GetServices()); } diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/ServiceHost/SrTests.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/ServiceHost/SrTests.cs index 15fff2af..c5148c8f 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/ServiceHost/SrTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/ServiceHost/SrTests.cs @@ -25,11 +25,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost Assert.True(SR.Culture == culture); var connectionServiceListDbErrorNullOwnerUri = SR.ConnectionServiceListDbErrorNullOwnerUri; - var connectionParamsValidateNullConnection = SR.ConnectionParamsValidateNullConnection; - var credentialsServiceInvalidCriticalHandle = SR.CredentialsServiceInvalidCriticalHandle; - var credentialsServicePasswordLengthExceeded = SR.CredentialsServicePasswordLengthExceeded; - var credentialsServiceTargetForDelete = SR.CredentialsServiceTargetForDelete; - var credentialsServiceTargetForLookup = SR.CredentialsServiceTargetForLookup; + var connectionParamsValidateNullConnection = SR.ConnectionParamsValidateNullConnection; var queryServiceCancelDisposeFailed = SR.QueryServiceCancelDisposeFailed; var queryServiceQueryCancelled = SR.QueryServiceQueryCancelled; var queryServiceDataReaderByteCountInvalid = SR.QueryServiceDataReaderByteCountInvalid; diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/project.json b/test/Microsoft.SqlTools.ServiceLayer.Test/project.json index 8aa02e30..78664765 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/project.json +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/project.json @@ -29,7 +29,13 @@ "target": "project" }, "Moq": "4.6.36-alpha", - "Microsoft.SqlTools.ServiceLayer.Test.Common": "1.0.0-*" + "Microsoft.SqlTools.ServiceLayer.Test.Common": "1.0.0-*", + "Microsoft.SqlTools.Hosting": { + "target": "project" + }, + "Microsoft.SqlTools.Credentials": { + "target": "project" + } }, "testRunner": "xunit", "frameworks": { diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/project.json b/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/project.json index 9bf1efdd..91f72e1b 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/project.json +++ b/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/project.json @@ -11,6 +11,12 @@ "Microsoft.SqlTools.ServiceLayer": { "target": "project" }, + "Microsoft.SqlTools.Hosting": { + "target": "project" + }, + "Microsoft.SqlTools.Credentials": { + "target": "project" + }, "Microsoft.SqlTools.ServiceLayer.TestDriver": "1.0.0-*", "Microsoft.SqlTools.ServiceLayer.Test.Common": "1.0.0-*" }, diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/project.json b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/project.json index 783170a1..8481db0c 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/project.json +++ b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/project.json @@ -9,6 +9,12 @@ "dotnet-test-xunit": "1.0.0-rc2-192208-24", "Microsoft.SqlTools.ServiceLayer": { "target": "project" + }, + "Microsoft.SqlTools.Hosting": { + "target": "project" + }, + "Microsoft.SqlTools.Credentials": { + "target": "project" } }, "testRunner": "xunit",