diff --git a/.travis.yml b/.travis.yml index 1ccae023..d98d3945 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,4 +37,7 @@ install: script: - dotnet build src/Microsoft.SqlTools.ServiceLayer - dotnet test test/Microsoft.SqlTools.ServiceLayer.Test + +env: + - ProjectPath=home/travis/build/Microsoft/sqltoolsservice \ No newline at end of file diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionInfo.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionInfo.html new file mode 100644 index 00000000..26fdbb5e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionInfo.html @@ -0,0 +1,417 @@ + + + + + + + + Class ConnectionInfo + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnConnectionHandler.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnConnectionHandler.html new file mode 100644 index 00000000..27805e9c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnConnectionHandler.html @@ -0,0 +1,156 @@ + + + + + + + + Delegate ConnectionService.OnConnectionHandler + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnDisconnectHandler.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnDisconnectHandler.html new file mode 100644 index 00000000..ddf2489f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnDisconnectHandler.html @@ -0,0 +1,160 @@ + + + + + + + + Delegate ConnectionService.OnDisconnectHandler + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.html new file mode 100644 index 00000000..eca0ae8e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.html @@ -0,0 +1,970 @@ + + + + + + + + Class ConnectionService + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectParams.html new file mode 100644 index 00000000..8e1c60d5 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectParams.html @@ -0,0 +1,187 @@ + + + + + + + + Class CancelConnectParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectRequest.html new file mode 100644 index 00000000..d666e6cd --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectRequest.html @@ -0,0 +1,184 @@ + + + + + + + + Class CancelConnectRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParams.html new file mode 100644 index 00000000..ac77bf96 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParams.html @@ -0,0 +1,225 @@ + + + + + + + + Class ConnectParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParamsExtensions.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParamsExtensions.html new file mode 100644 index 00000000..8a0c6428 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParamsExtensions.html @@ -0,0 +1,208 @@ + + + + + + + + Class ConnectParamsExtensions + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedNotification.html new file mode 100644 index 00000000..bf1e4846 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedNotification.html @@ -0,0 +1,184 @@ + + + + + + + + Class ConnectionChangedNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedParams.html new file mode 100644 index 00000000..5dedd075 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedParams.html @@ -0,0 +1,218 @@ + + + + + + + + Class ConnectionChangedParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteNotification.html new file mode 100644 index 00000000..620f7021 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteNotification.html @@ -0,0 +1,184 @@ + + + + + + + + Class ConnectionCompleteNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteParams.html new file mode 100644 index 00000000..bdd5ac37 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteParams.html @@ -0,0 +1,373 @@ + + + + + + + + Class ConnectionCompleteParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetails.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetails.html new file mode 100644 index 00000000..b95cf968 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetails.html @@ -0,0 +1,888 @@ + + + + + + + + Class ConnectionDetails + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetailsExtensions.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetailsExtensions.html new file mode 100644 index 00000000..b1d51be5 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetailsExtensions.html @@ -0,0 +1,203 @@ + + + + + + + + Class ConnectionDetailsExtensions + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionRequest.html new file mode 100644 index 00000000..a33a39e6 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionRequest.html @@ -0,0 +1,184 @@ + + + + + + + + Class ConnectionRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummary.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummary.html new file mode 100644 index 00000000..7014300c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummary.html @@ -0,0 +1,253 @@ + + + + + + + + Class ConnectionSummary + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryComparer.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryComparer.html new file mode 100644 index 00000000..8d0114ee --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryComparer.html @@ -0,0 +1,258 @@ + + + + + + + + Class ConnectionSummaryComparer + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryExtensions.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryExtensions.html new file mode 100644 index 00000000..547e0a62 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryExtensions.html @@ -0,0 +1,203 @@ + + + + + + + + Class ConnectionSummaryExtensions + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectParams.html new file mode 100644 index 00000000..f40fce4b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectParams.html @@ -0,0 +1,187 @@ + + + + + + + + Class DisconnectParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectRequest.html new file mode 100644 index 00000000..849e517f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectRequest.html @@ -0,0 +1,184 @@ + + + + + + + + Class DisconnectRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesParams.html new file mode 100644 index 00000000..5c244837 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesParams.html @@ -0,0 +1,186 @@ + + + + + + + + Class ListDatabasesParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesRequest.html new file mode 100644 index 00000000..d2c2f5b2 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesRequest.html @@ -0,0 +1,184 @@ + + + + + + + + Class ListDatabasesRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesResponse.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesResponse.html new file mode 100644 index 00000000..287f09ba --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesResponse.html @@ -0,0 +1,186 @@ + + + + + + + + Class ListDatabasesResponse + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ServerInfo.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ServerInfo.html new file mode 100644 index 00000000..b9969ee1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ServerInfo.html @@ -0,0 +1,465 @@ + + + + + + + + Class ServerInfo + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.html new file mode 100644 index 00000000..c224757c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.html @@ -0,0 +1,176 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ISqlConnectionFactory.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ISqlConnectionFactory.html new file mode 100644 index 00000000..8cc8b41d --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.ISqlConnectionFactory.html @@ -0,0 +1,174 @@ + + + + + + + + Interface ISqlConnectionFactory + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.SqlConnectionFactory.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.SqlConnectionFactory.html new file mode 100644 index 00000000..1e22e91f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.SqlConnectionFactory.html @@ -0,0 +1,207 @@ + + + + + + + + Class SqlConnectionFactory + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.html new file mode 100644 index 00000000..4f3fda2e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Connection.html @@ -0,0 +1,139 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Connection + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.Credential.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.Credential.html new file mode 100644 index 00000000..bbb09660 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.Credential.html @@ -0,0 +1,376 @@ + + + + + + + + Class Credential + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.DeleteCredentialRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.DeleteCredentialRequest.html new file mode 100644 index 00000000..ca2593f9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.DeleteCredentialRequest.html @@ -0,0 +1,185 @@ + + + + + + + + Class DeleteCredentialRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.ReadCredentialRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.ReadCredentialRequest.html new file mode 100644 index 00000000..2c211489 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.ReadCredentialRequest.html @@ -0,0 +1,186 @@ + + + + + + + + Class ReadCredentialRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.SaveCredentialRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.SaveCredentialRequest.html new file mode 100644 index 00000000..f3f677cc --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.SaveCredentialRequest.html @@ -0,0 +1,185 @@ + + + + + + + + Class SaveCredentialRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.html new file mode 100644 index 00000000..7a0f3aa2 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.html @@ -0,0 +1,131 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Credentials.Contracts + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.CredentialService.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.CredentialService.html new file mode 100644 index 00000000..ef32ba8e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.CredentialService.html @@ -0,0 +1,377 @@ + + + + + + + + Class CredentialService + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.ICredentialStore.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.ICredentialStore.html new file mode 100644 index 00000000..103788a7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.ICredentialStore.html @@ -0,0 +1,283 @@ + + + + + + + + Interface ICredentialStore + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.CredentialsWrapper.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.CredentialsWrapper.html new file mode 100644 index 00000000..0f863081 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.CredentialsWrapper.html @@ -0,0 +1,185 @@ + + + + + + + + Class CredentialsWrapper + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.FileTokenStorage.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.FileTokenStorage.html new file mode 100644 index 00000000..47c602d8 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.FileTokenStorage.html @@ -0,0 +1,302 @@ + + + + + + + + Class FileTokenStorage + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.html new file mode 100644 index 00000000..0abb88ad --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.html @@ -0,0 +1,121 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Credentials.Linux + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialSet.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialSet.html new file mode 100644 index 00000000..690239e4 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialSet.html @@ -0,0 +1,490 @@ + + + + + + + + Class CredentialSet + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialType.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialType.html new file mode 100644 index 00000000..664e822b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialType.html @@ -0,0 +1,155 @@ + + + + + + + + Enum CredentialType + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.PersistanceType.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.PersistanceType.html new file mode 100644 index 00000000..671a44d0 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.PersistanceType.html @@ -0,0 +1,147 @@ + + + + + + + + Enum PersistanceType + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.Win32Credential.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.Win32Credential.html new file mode 100644 index 00000000..b9f3547c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.Win32Credential.html @@ -0,0 +1,738 @@ + + + + + + + + Class Win32Credential + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.html new file mode 100644 index 00000000..9cd08590 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.html @@ -0,0 +1,126 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32 + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.html new file mode 100644 index 00000000..a158a76e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Credentials.html @@ -0,0 +1,125 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Credentials + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ClientCapabilities.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ClientCapabilities.html new file mode 100644 index 00000000..c6209382 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ClientCapabilities.html @@ -0,0 +1,155 @@ + + + + + + + + Class ClientCapabilities + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.CompletionOptions.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.CompletionOptions.html new file mode 100644 index 00000000..a52a5c46 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.CompletionOptions.html @@ -0,0 +1,214 @@ + + + + + + + + Class CompletionOptions + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ExitNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ExitNotification.html new file mode 100644 index 00000000..79994f17 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ExitNotification.html @@ -0,0 +1,185 @@ + + + + + + + + Class ExitNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorEvent.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorEvent.html new file mode 100644 index 00000000..f335c933 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorEvent.html @@ -0,0 +1,183 @@ + + + + + + + + Class HostingErrorEvent + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorParams.html new file mode 100644 index 00000000..d5a1c60c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorParams.html @@ -0,0 +1,186 @@ + + + + + + + + Class HostingErrorParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeError.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeError.html new file mode 100644 index 00000000..1cd0c2ca --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeError.html @@ -0,0 +1,186 @@ + + + + + + + + Class InitializeError + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeRequest.html new file mode 100644 index 00000000..b2173ef6 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeRequest.html @@ -0,0 +1,249 @@ + + + + + + + + Class InitializeRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeResult.html new file mode 100644 index 00000000..eced07d5 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeResult.html @@ -0,0 +1,185 @@ + + + + + + + + Class InitializeResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ServerCapabilities.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ServerCapabilities.html new file mode 100644 index 00000000..dd7bb0a5 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ServerCapabilities.html @@ -0,0 +1,424 @@ + + + + + + + + Class ServerCapabilities + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ShutdownRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ShutdownRequest.html new file mode 100644 index 00000000..ec9abaad --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ShutdownRequest.html @@ -0,0 +1,185 @@ + + + + + + + + Class ShutdownRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.SignatureHelpOptions.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.SignatureHelpOptions.html new file mode 100644 index 00000000..284421b6 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.SignatureHelpOptions.html @@ -0,0 +1,184 @@ + + + + + + + + Class SignatureHelpOptions + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.TextDocumentSyncKind.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.TextDocumentSyncKind.html new file mode 100644 index 00000000..0e8c7565 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.TextDocumentSyncKind.html @@ -0,0 +1,152 @@ + + + + + + + + Enum TextDocumentSyncKind + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.VersionRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.VersionRequest.html new file mode 100644 index 00000000..2d220245 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.VersionRequest.html @@ -0,0 +1,185 @@ + + + + + + + + Class VersionRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.html new file mode 100644 index 00000000..1c37ec58 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.html @@ -0,0 +1,155 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.ChannelBase.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.ChannelBase.html new file mode 100644 index 00000000..5a6990ae --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.ChannelBase.html @@ -0,0 +1,390 @@ + + + + + + + + Class ChannelBase + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioClientChannel.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioClientChannel.html new file mode 100644 index 00000000..bdcd62d7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioClientChannel.html @@ -0,0 +1,331 @@ + + + + + + + + Class StdioClientChannel + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioServerChannel.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioServerChannel.html new file mode 100644 index 00000000..f908f2ec --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioServerChannel.html @@ -0,0 +1,256 @@ + + + + + + + + Class StdioServerChannel + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.html new file mode 100644 index 00000000..bca7efef --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.html @@ -0,0 +1,130 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Constants.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Constants.html new file mode 100644 index 00000000..8b4d98d8 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Constants.html @@ -0,0 +1,241 @@ + + + + + + + + Class Constants + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.EventType-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.EventType-1.html new file mode 100644 index 00000000..dbd538b4 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.EventType-1.html @@ -0,0 +1,253 @@ + + + + + + + + Class EventType<TParams> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message.html new file mode 100644 index 00000000..b20b3792 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message.html @@ -0,0 +1,586 @@ + + + + + + + + Class Message + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.MessageType.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.MessageType.html new file mode 100644 index 00000000..8c3fa160 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.MessageType.html @@ -0,0 +1,152 @@ + + + + + + + + Enum MessageType + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.RequestType-2.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.RequestType-2.html new file mode 100644 index 00000000..636c6118 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.RequestType-2.html @@ -0,0 +1,252 @@ + + + + + + + + Class RequestType<TParams, TResult> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.html new file mode 100644 index 00000000..8e076a18 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.html @@ -0,0 +1,129 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.EventContext.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.EventContext.html new file mode 100644 index 00000000..8a1c0281 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.EventContext.html @@ -0,0 +1,273 @@ + + + + + + + + Class EventContext + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IMessageSender.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IMessageSender.html new file mode 100644 index 00000000..5bfd33b8 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IMessageSender.html @@ -0,0 +1,268 @@ + + + + + + + + Interface IMessageSender + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IProtocolEndpoint.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IProtocolEndpoint.html new file mode 100644 index 00000000..237af0a7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IProtocolEndpoint.html @@ -0,0 +1,302 @@ + + + + + + + + Interface IProtocolEndpoint + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageDispatcher.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageDispatcher.html new file mode 100644 index 00000000..397cc00d --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageDispatcher.html @@ -0,0 +1,713 @@ + + + + + + + + Class MessageDispatcher + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageParseException.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageParseException.html new file mode 100644 index 00000000..1c2d17ac --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageParseException.html @@ -0,0 +1,253 @@ + + + + + + + + Class MessageParseException + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageProtocolType.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageProtocolType.html new file mode 100644 index 00000000..54047074 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageProtocolType.html @@ -0,0 +1,146 @@ + + + + + + + + Enum MessageProtocolType + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageReader.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageReader.html new file mode 100644 index 00000000..ac167735 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageReader.html @@ -0,0 +1,288 @@ + + + + + + + + Class MessageReader + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageWriter.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageWriter.html new file mode 100644 index 00000000..e290054f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageWriter.html @@ -0,0 +1,455 @@ + + + + + + + + Class MessageWriter + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.ProtocolEndpoint.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.ProtocolEndpoint.html new file mode 100644 index 00000000..97df3afc --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.ProtocolEndpoint.html @@ -0,0 +1,796 @@ + + + + + + + + Class ProtocolEndpoint + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.RequestContext-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.RequestContext-1.html new file mode 100644 index 00000000..5bdb2d95 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.RequestContext-1.html @@ -0,0 +1,384 @@ + + + + + + + + Class RequestContext<TResult> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.IMessageSerializer.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.IMessageSerializer.html new file mode 100644 index 00000000..19d13b9d --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.IMessageSerializer.html @@ -0,0 +1,226 @@ + + + + + + + + Interface IMessageSerializer + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.JsonRpcMessageSerializer.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.JsonRpcMessageSerializer.html new file mode 100644 index 00000000..14bde949 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.JsonRpcMessageSerializer.html @@ -0,0 +1,254 @@ + + + + + + + + Class JsonRpcMessageSerializer + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.V8MessageSerializer.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.V8MessageSerializer.html new file mode 100644 index 00000000..064eee54 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.V8MessageSerializer.html @@ -0,0 +1,253 @@ + + + + + + + + Class V8MessageSerializer + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.html new file mode 100644 index 00000000..ffbdf882 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.html @@ -0,0 +1,128 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.html new file mode 100644 index 00000000..6c905676 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.html @@ -0,0 +1,150 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.InitializeCallback.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.InitializeCallback.html new file mode 100644 index 00000000..045d6e38 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.InitializeCallback.html @@ -0,0 +1,161 @@ + + + + + + + + Delegate ServiceHost.InitializeCallback + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.ShutdownCallback.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.ShutdownCallback.html new file mode 100644 index 00000000..f3fd471e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.ShutdownCallback.html @@ -0,0 +1,161 @@ + + + + + + + + Delegate ServiceHost.ShutdownCallback + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.html new file mode 100644 index 00000000..15fb1b2a --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.html @@ -0,0 +1,315 @@ + + + + + + + + Class ServiceHost + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHostBase.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHostBase.html new file mode 100644 index 00000000..890a9c9c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHostBase.html @@ -0,0 +1,258 @@ + + + + + + + + Class ServiceHostBase + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.html new file mode 100644 index 00000000..0f763dfb --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Hosting.html @@ -0,0 +1,131 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Hosting + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.InteractionMetrics-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.InteractionMetrics-1.html new file mode 100644 index 00000000..a90c5963 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.InteractionMetrics-1.html @@ -0,0 +1,312 @@ + + + + + + + + Class InteractionMetrics<T> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.AutoCompleteHelper.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.AutoCompleteHelper.html new file mode 100644 index 00000000..7ac35a65 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.AutoCompleteHelper.html @@ -0,0 +1,154 @@ + + + + + + + + Class AutoCompleteHelper + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.BindingQueue-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.BindingQueue-1.html new file mode 100644 index 00000000..276e14e5 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.BindingQueue-1.html @@ -0,0 +1,402 @@ + + + + + + + + Class BindingQueue<T> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.AutoCompletionResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.AutoCompletionResult.html new file mode 100644 index 00000000..e5eb4423 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.AutoCompletionResult.html @@ -0,0 +1,270 @@ + + + + + + + + Class AutoCompletionResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.ISqlParserWrapper.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.ISqlParserWrapper.html new file mode 100644 index 00000000..c8168240 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.ISqlParserWrapper.html @@ -0,0 +1,188 @@ + + + + + + + + Interface ISqlParserWrapper + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlCompletionItem.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlCompletionItem.html new file mode 100644 index 00000000..fd5d7b85 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlCompletionItem.html @@ -0,0 +1,593 @@ + + + + + + + + Class SqlCompletionItem + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlParserWrapper.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlParserWrapper.html new file mode 100644 index 00000000..767b36c2 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlParserWrapper.html @@ -0,0 +1,220 @@ + + + + + + + + Class SqlParserWrapper + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.html new file mode 100644 index 00000000..76bdb4e1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.html @@ -0,0 +1,130 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingContext.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingContext.html new file mode 100644 index 00000000..1a91d450 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingContext.html @@ -0,0 +1,569 @@ + + + + + + + + Class ConnectedBindingContext + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingQueue.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingQueue.html new file mode 100644 index 00000000..7dbd1347 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingQueue.html @@ -0,0 +1,216 @@ + + + + + + + + Class ConnectedBindingQueue + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItem.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItem.html new file mode 100644 index 00000000..5c9ab347 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItem.html @@ -0,0 +1,429 @@ + + + + + + + + Class CompletionItem + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItemKind.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItemKind.html new file mode 100644 index 00000000..b8481681 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItemKind.html @@ -0,0 +1,207 @@ + + + + + + + + Enum CompletionItemKind + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionRequest.html new file mode 100644 index 00000000..0d3f51c1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class CompletionRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionResolveRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionResolveRequest.html new file mode 100644 index 00000000..c61f575f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionResolveRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class CompletionResolveRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionError.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionError.html new file mode 100644 index 00000000..225f99ba --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionError.html @@ -0,0 +1,186 @@ + + + + + + + + Class DefinitionError + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionRequest.html new file mode 100644 index 00000000..ea93dbd9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class DefinitionRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Diagnostic.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Diagnostic.html new file mode 100644 index 00000000..992a565e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Diagnostic.html @@ -0,0 +1,278 @@ + + + + + + + + Class Diagnostic + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DiagnosticSeverity.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DiagnosticSeverity.html new file mode 100644 index 00000000..159ed9d9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DiagnosticSeverity.html @@ -0,0 +1,155 @@ + + + + + + + + Enum DiagnosticSeverity + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlight.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlight.html new file mode 100644 index 00000000..fac5198f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlight.html @@ -0,0 +1,214 @@ + + + + + + + + Class DocumentHighlight + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightKind.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightKind.html new file mode 100644 index 00000000..0ed380a2 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightKind.html @@ -0,0 +1,147 @@ + + + + + + + + Enum DocumentHighlightKind + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightRequest.html new file mode 100644 index 00000000..0a19561f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class DocumentHighlightRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ExpandAliasRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ExpandAliasRequest.html new file mode 100644 index 00000000..669563ac --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ExpandAliasRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class ExpandAliasRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.FindModuleRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.FindModuleRequest.html new file mode 100644 index 00000000..71afa6a7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.FindModuleRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class FindModuleRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Hover.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Hover.html new file mode 100644 index 00000000..8f01773b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Hover.html @@ -0,0 +1,214 @@ + + + + + + + + Class Hover + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.HoverRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.HoverRequest.html new file mode 100644 index 00000000..47ca67f7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.HoverRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class HoverRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyNotification.html new file mode 100644 index 00000000..df648bf3 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyNotification.html @@ -0,0 +1,184 @@ + + + + + + + + Class IntelliSenseReadyNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyParams.html new file mode 100644 index 00000000..6a5a0308 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyParams.html @@ -0,0 +1,186 @@ + + + + + + + + Class IntelliSenseReadyParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.MarkedString.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.MarkedString.html new file mode 100644 index 00000000..54add9a6 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.MarkedString.html @@ -0,0 +1,214 @@ + + + + + + + + Class MarkedString + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PSModuleMessage.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PSModuleMessage.html new file mode 100644 index 00000000..346210a4 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PSModuleMessage.html @@ -0,0 +1,214 @@ + + + + + + + + Class PSModuleMessage + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ParameterInformation.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ParameterInformation.html new file mode 100644 index 00000000..7a8601f2 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ParameterInformation.html @@ -0,0 +1,214 @@ + + + + + + + + Class ParameterInformation + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PublishDiagnosticsNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PublishDiagnosticsNotification.html new file mode 100644 index 00000000..dd2ba86b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PublishDiagnosticsNotification.html @@ -0,0 +1,247 @@ + + + + + + + + Class PublishDiagnosticsNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesContext.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesContext.html new file mode 100644 index 00000000..78b3e6bb --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesContext.html @@ -0,0 +1,184 @@ + + + + + + + + Class ReferencesContext + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesParams.html new file mode 100644 index 00000000..c3f8a3f3 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesParams.html @@ -0,0 +1,191 @@ + + + + + + + + Class ReferencesParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesRequest.html new file mode 100644 index 00000000..45f893a7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class ReferencesRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ShowOnlineHelpRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ShowOnlineHelpRequest.html new file mode 100644 index 00000000..f81579ed --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ShowOnlineHelpRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class ShowOnlineHelpRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelp.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelp.html new file mode 100644 index 00000000..79c85494 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelp.html @@ -0,0 +1,244 @@ + + + + + + + + Class SignatureHelp + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelpRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelpRequest.html new file mode 100644 index 00000000..3a6dad30 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelpRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class SignatureHelpRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureInformation.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureInformation.html new file mode 100644 index 00000000..c484e170 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureInformation.html @@ -0,0 +1,244 @@ + + + + + + + + Class SignatureInformation + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangeParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangeParams.html new file mode 100644 index 00000000..6b42b459 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangeParams.html @@ -0,0 +1,217 @@ + + + + + + + + Class StatusChangeParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangedNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangedNotification.html new file mode 100644 index 00000000..b3528e5b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangedNotification.html @@ -0,0 +1,184 @@ + + + + + + + + Class StatusChangedNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryEventNames.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryEventNames.html new file mode 100644 index 00000000..6dfd593c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryEventNames.html @@ -0,0 +1,215 @@ + + + + + + + + Class TelemetryEventNames + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryNotification.html new file mode 100644 index 00000000..467db6d9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryNotification.html @@ -0,0 +1,184 @@ + + + + + + + + Class TelemetryNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryParams.html new file mode 100644 index 00000000..27f36589 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryParams.html @@ -0,0 +1,185 @@ + + + + + + + + Class TelemetryParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryProperties.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryProperties.html new file mode 100644 index 00000000..2ff3a6d8 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryProperties.html @@ -0,0 +1,246 @@ + + + + + + + + Class TelemetryProperties + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TextEdit.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TextEdit.html new file mode 100644 index 00000000..b4928658 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TextEdit.html @@ -0,0 +1,214 @@ + + + + + + + + Class TextEdit + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.html new file mode 100644 index 00000000..698be8f8 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.html @@ -0,0 +1,196 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DefinitionResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DefinitionResult.html new file mode 100644 index 00000000..8d31ecfc --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DefinitionResult.html @@ -0,0 +1,248 @@ + + + + + + + + Class DefinitionResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DiagnosticsHelper.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DiagnosticsHelper.html new file mode 100644 index 00000000..9f076010 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DiagnosticsHelper.html @@ -0,0 +1,154 @@ + + + + + + + + Class DiagnosticsHelper + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DocumentStatusHelper.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DocumentStatusHelper.html new file mode 100644 index 00000000..b7d189ef --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DocumentStatusHelper.html @@ -0,0 +1,326 @@ + + + + + + + + Class DocumentStatusHelper + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.IBindingContext.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.IBindingContext.html new file mode 100644 index 00000000..f73cd7ef --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.IBindingContext.html @@ -0,0 +1,498 @@ + + + + + + + + Interface IBindingContext + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.html new file mode 100644 index 00000000..aaba2c80 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.html @@ -0,0 +1,607 @@ + + + + + + + + Class LanguageService + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.QueueItem.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.QueueItem.html new file mode 100644 index 00000000..b14fc44d --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.QueueItem.html @@ -0,0 +1,438 @@ + + + + + + + + Class QueueItem + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.html new file mode 100644 index 00000000..cc58e5d7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.html @@ -0,0 +1,151 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.LanguageServices + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.BatchAsyncEventHandler.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.BatchAsyncEventHandler.html new file mode 100644 index 00000000..36968dcd --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.BatchAsyncEventHandler.html @@ -0,0 +1,157 @@ + + + + + + + + Delegate Batch.BatchAsyncEventHandler + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.html new file mode 100644 index 00000000..f12bfb21 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.html @@ -0,0 +1,759 @@ + + + + + + + + Class Batch + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.BatchSummary.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.BatchSummary.html new file mode 100644 index 00000000..ad5941d0 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.BatchSummary.html @@ -0,0 +1,403 @@ + + + + + + + + Class BatchSummary + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbCellValue.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbCellValue.html new file mode 100644 index 00000000..773b3fbd --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbCellValue.html @@ -0,0 +1,186 @@ + + + + + + + + Class DbCellValue + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbColumnWrapper.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbColumnWrapper.html new file mode 100644 index 00000000..4399ae22 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbColumnWrapper.html @@ -0,0 +1,1066 @@ + + + + + + + + Class DbColumnWrapper + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelParams.html new file mode 100644 index 00000000..7a583f4b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelParams.html @@ -0,0 +1,185 @@ + + + + + + + + Class QueryCancelParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelRequest.html new file mode 100644 index 00000000..5d66854f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class QueryCancelRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelResult.html new file mode 100644 index 00000000..7a02df69 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelResult.html @@ -0,0 +1,187 @@ + + + + + + + + Class QueryCancelResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeParams.html new file mode 100644 index 00000000..b0b61731 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeParams.html @@ -0,0 +1,185 @@ + + + + + + + + Class QueryDisposeParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeRequest.html new file mode 100644 index 00000000..9d338acd --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class QueryDisposeRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeResult.html new file mode 100644 index 00000000..de2c4f2e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeResult.html @@ -0,0 +1,187 @@ + + + + + + + + Class QueryDisposeResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchCompleteEvent.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchCompleteEvent.html new file mode 100644 index 00000000..903085d6 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchCompleteEvent.html @@ -0,0 +1,183 @@ + + + + + + + + Class QueryExecuteBatchCompleteEvent + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchNotificationParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchNotificationParams.html new file mode 100644 index 00000000..43e46682 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchNotificationParams.html @@ -0,0 +1,218 @@ + + + + + + + + Class QueryExecuteBatchNotificationParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchStartEvent.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchStartEvent.html new file mode 100644 index 00000000..e693f526 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchStartEvent.html @@ -0,0 +1,183 @@ + + + + + + + + Class QueryExecuteBatchStartEvent + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteEvent.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteEvent.html new file mode 100644 index 00000000..a2642a2c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteEvent.html @@ -0,0 +1,183 @@ + + + + + + + + Class QueryExecuteCompleteEvent + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteParams.html new file mode 100644 index 00000000..a18c1608 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteParams.html @@ -0,0 +1,248 @@ + + + + + + + + Class QueryExecuteCompleteParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteParams.html new file mode 100644 index 00000000..21654cd9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteParams.html @@ -0,0 +1,217 @@ + + + + + + + + Class QueryExecuteParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteRequest.html new file mode 100644 index 00000000..d41848eb --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class QueryExecuteRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResult.html new file mode 100644 index 00000000..124c0195 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResult.html @@ -0,0 +1,186 @@ + + + + + + + + Class QueryExecuteResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteEvent.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteEvent.html new file mode 100644 index 00000000..be91f957 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteEvent.html @@ -0,0 +1,183 @@ + + + + + + + + Class QueryExecuteResultSetCompleteEvent + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteParams.html new file mode 100644 index 00000000..01f628eb --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteParams.html @@ -0,0 +1,214 @@ + + + + + + + + Class QueryExecuteResultSetCompleteParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetParams.html new file mode 100644 index 00000000..3245d0f3 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetParams.html @@ -0,0 +1,313 @@ + + + + + + + + Class QueryExecuteSubsetParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetRequest.html new file mode 100644 index 00000000..b87841e7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class QueryExecuteSubsetRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetResult.html new file mode 100644 index 00000000..eb8c047b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetResult.html @@ -0,0 +1,217 @@ + + + + + + + + Class QueryExecuteSubsetResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultMessage.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultMessage.html new file mode 100644 index 00000000..c9b46c55 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultMessage.html @@ -0,0 +1,307 @@ + + + + + + + + Class ResultMessage + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSubset.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSubset.html new file mode 100644 index 00000000..c2ad8e5a --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSubset.html @@ -0,0 +1,218 @@ + + + + + + + + Class ResultSetSubset + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSummary.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSummary.html new file mode 100644 index 00000000..5e58c4b1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSummary.html @@ -0,0 +1,279 @@ + + + + + + + + Class ResultSetSummary + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestError.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestError.html new file mode 100644 index 00000000..e7194731 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestError.html @@ -0,0 +1,186 @@ + + + + + + + + Class SaveResultRequestError + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestResult.html new file mode 100644 index 00000000..e9d063a3 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestResult.html @@ -0,0 +1,186 @@ + + + + + + + + Class SaveResultRequestResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequest.html new file mode 100644 index 00000000..31bce821 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequest.html @@ -0,0 +1,184 @@ + + + + + + + + Class SaveResultsAsCsvRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequestParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequestParams.html new file mode 100644 index 00000000..d1cf6cca --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequestParams.html @@ -0,0 +1,211 @@ + + + + + + + + Class SaveResultsAsCsvRequestParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequest.html new file mode 100644 index 00000000..8a5ce9cd --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequest.html @@ -0,0 +1,184 @@ + + + + + + + + Class SaveResultsAsJsonRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequestParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequestParams.html new file mode 100644 index 00000000..25d43202 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequestParams.html @@ -0,0 +1,178 @@ + + + + + + + + Class SaveResultsAsJsonRequestParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsRequestParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsRequestParams.html new file mode 100644 index 00000000..84934f54 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsRequestParams.html @@ -0,0 +1,405 @@ + + + + + + + + Class SaveResultsRequestParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SelectionData.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SelectionData.html new file mode 100644 index 00000000..332da8e1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SelectionData.html @@ -0,0 +1,418 @@ + + + + + + + + Class SelectionData + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.html new file mode 100644 index 00000000..e9362f41 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.html @@ -0,0 +1,208 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.FileStreamReadResult.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.FileStreamReadResult.html new file mode 100644 index 00000000..84ecf0c3 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.FileStreamReadResult.html @@ -0,0 +1,259 @@ + + + + + + + + Struct FileStreamReadResult + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamFactory.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamFactory.html new file mode 100644 index 00000000..417aff4a --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamFactory.html @@ -0,0 +1,292 @@ + + + + + + + + Interface IFileStreamFactory + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamReader.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamReader.html new file mode 100644 index 00000000..557d76d7 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamReader.html @@ -0,0 +1,983 @@ + + + + + + + + Interface IFileStreamReader + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamWriter.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamWriter.html new file mode 100644 index 00000000..804a5905 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamWriter.html @@ -0,0 +1,1028 @@ + + + + + + + + Interface IFileStreamWriter + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamFactory.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamFactory.html new file mode 100644 index 00000000..0f4b96d1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamFactory.html @@ -0,0 +1,343 @@ + + + + + + + + Class ServiceBufferFileStreamFactory + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamReader.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamReader.html new file mode 100644 index 00000000..6b8c4f64 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamReader.html @@ -0,0 +1,1197 @@ + + + + + + + + Class ServiceBufferFileStreamReader + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamWriter.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamWriter.html new file mode 100644 index 00000000..1afc5621 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamWriter.html @@ -0,0 +1,1245 @@ + + + + + + + + Class ServiceBufferFileStreamWriter + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.StorageDataReader.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.StorageDataReader.html new file mode 100644 index 00000000..c06b3205 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.StorageDataReader.html @@ -0,0 +1,637 @@ + + + + + + + + Class StorageDataReader + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.html new file mode 100644 index 00000000..893c965c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.html @@ -0,0 +1,145 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncErrorEventHandler.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncErrorEventHandler.html new file mode 100644 index 00000000..d2c0b7d4 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncErrorEventHandler.html @@ -0,0 +1,157 @@ + + + + + + + + Delegate Query.QueryAsyncErrorEventHandler + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncEventHandler.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncEventHandler.html new file mode 100644 index 00000000..ec5eed3e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncEventHandler.html @@ -0,0 +1,157 @@ + + + + + + + + Delegate Query.QueryAsyncEventHandler + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.html new file mode 100644 index 00000000..84b446ce --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.html @@ -0,0 +1,637 @@ + + + + + + + + Class Query + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.QueryExecutionService.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.QueryExecutionService.html new file mode 100644 index 00000000..9e968f2c --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.QueryExecutionService.html @@ -0,0 +1,463 @@ + + + + + + + + Class QueryExecutionService + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.ResultSetAsyncEventHandler.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.ResultSetAsyncEventHandler.html new file mode 100644 index 00000000..3c555a86 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.ResultSetAsyncEventHandler.html @@ -0,0 +1,157 @@ + + + + + + + + Delegate ResultSet.ResultSetAsyncEventHandler + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.html new file mode 100644 index 00000000..bf5b09ba --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.html @@ -0,0 +1,615 @@ + + + + + + + + Class ResultSet + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.html new file mode 100644 index 00000000..ad53efa1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.html @@ -0,0 +1,143 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.QueryExecution + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.HostDetails.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.HostDetails.html new file mode 100644 index 00000000..19b33f4e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.HostDetails.html @@ -0,0 +1,428 @@ + + + + + + + + Class HostDetails + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.IntelliSenseSettings.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.IntelliSenseSettings.html new file mode 100644 index 00000000..7039b13a --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.IntelliSenseSettings.html @@ -0,0 +1,363 @@ + + + + + + + + Class IntelliSenseSettings + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.QueryExecutionSettings.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.QueryExecutionSettings.html new file mode 100644 index 00000000..50993b17 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.QueryExecutionSettings.html @@ -0,0 +1,222 @@ + + + + + + + + Class QueryExecutionSettings + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsContext.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsContext.html new file mode 100644 index 00000000..fdb79f17 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsContext.html @@ -0,0 +1,221 @@ + + + + + + + + Class SqlToolsContext + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettings.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettings.html new file mode 100644 index 00000000..85b0c447 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettings.html @@ -0,0 +1,377 @@ + + + + + + + + Class SqlToolsSettings + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettingsValues.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettingsValues.html new file mode 100644 index 00000000..5f615550 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettingsValues.html @@ -0,0 +1,235 @@ + + + + + + + + Class SqlToolsSettingsValues + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.html new file mode 100644 index 00000000..69b1acb1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.SqlContext.html @@ -0,0 +1,135 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.SqlContext + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContext.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContext.html new file mode 100644 index 00000000..505806f3 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContext.html @@ -0,0 +1,192 @@ + + + + + + + + Class AsyncContext + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContextThread.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContextThread.html new file mode 100644 index 00000000..73f6a7d3 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContextThread.html @@ -0,0 +1,258 @@ + + + + + + + + Class AsyncContextThread + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncLock.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncLock.html new file mode 100644 index 00000000..76fa74b8 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncLock.html @@ -0,0 +1,258 @@ + + + + + + + + Class AsyncLock + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncQueue-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncQueue-1.html new file mode 100644 index 00000000..7fbbd5b3 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncQueue-1.html @@ -0,0 +1,394 @@ + + + + + + + + Class AsyncQueue<T> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LogLevel.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LogLevel.html new file mode 100644 index 00000000..14f884c8 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LogLevel.html @@ -0,0 +1,156 @@ + + + + + + + + Enum LogLevel + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.Logger.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.Logger.html new file mode 100644 index 00000000..ef2bd0da --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.Logger.html @@ -0,0 +1,275 @@ + + + + + + + + Class Logger + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.LongListEnumerator-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.LongListEnumerator-1.html new file mode 100644 index 00000000..e3969fea --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.LongListEnumerator-1.html @@ -0,0 +1,344 @@ + + + + + + + + Class LongList<T>.LongListEnumerator<TEt> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.html new file mode 100644 index 00000000..8804bb67 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.html @@ -0,0 +1,508 @@ + + + + + + + + Class LongList<T> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.TextUtilities.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.TextUtilities.html new file mode 100644 index 00000000..74ddc120 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.TextUtilities.html @@ -0,0 +1,383 @@ + + + + + + + + Class TextUtilities + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.ThreadSynchronizationContext.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.ThreadSynchronizationContext.html new file mode 100644 index 00000000..8c820a67 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.ThreadSynchronizationContext.html @@ -0,0 +1,252 @@ + + + + + + + + Class ThreadSynchronizationContext + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.Validate.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.Validate.html new file mode 100644 index 00000000..fa8b59a5 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.Validate.html @@ -0,0 +1,485 @@ + + + + + + + + Class Validate + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.html new file mode 100644 index 00000000..f64efaa1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Utility.html @@ -0,0 +1,160 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Utility + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition.html new file mode 100644 index 00000000..dd4f9ce9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition.html @@ -0,0 +1,490 @@ + + + + + + + + Class BufferPosition + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange.html new file mode 100644 index 00000000..930bdb07 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange.html @@ -0,0 +1,458 @@ + + + + + + + + Class BufferRange + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationNotification-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationNotification-1.html new file mode 100644 index 00000000..2317a567 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationNotification-1.html @@ -0,0 +1,198 @@ + + + + + + + + Class DidChangeConfigurationNotification<TConfig> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationParams-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationParams-1.html new file mode 100644 index 00000000..7c42760f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationParams-1.html @@ -0,0 +1,199 @@ + + + + + + + + Class DidChangeConfigurationParams<TConfig> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentNotification.html new file mode 100644 index 00000000..ba3e3c59 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentNotification.html @@ -0,0 +1,183 @@ + + + + + + + + Class DidChangeTextDocumentNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentParams.html new file mode 100644 index 00000000..9bbaeb4b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentParams.html @@ -0,0 +1,216 @@ + + + + + + + + Class DidChangeTextDocumentParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentNotification.html new file mode 100644 index 00000000..154c2108 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentNotification.html @@ -0,0 +1,183 @@ + + + + + + + + Class DidCloseTextDocumentNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentParams.html new file mode 100644 index 00000000..58d8489d --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentParams.html @@ -0,0 +1,185 @@ + + + + + + + + Class DidCloseTextDocumentParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidOpenTextDocumentNotification.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidOpenTextDocumentNotification.html new file mode 100644 index 00000000..9eaccaf9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidOpenTextDocumentNotification.html @@ -0,0 +1,216 @@ + + + + + + + + Class DidOpenTextDocumentNotification + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolParams.html new file mode 100644 index 00000000..5c47564f --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolParams.html @@ -0,0 +1,185 @@ + + + + + + + + Class DocumentSymbolParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolRequest.html new file mode 100644 index 00000000..e7899e96 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class DocumentSymbolRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChange.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChange.html new file mode 100644 index 00000000..b95bdefa --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChange.html @@ -0,0 +1,310 @@ + + + + + + + + Class FileChange + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChangeType.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChangeType.html new file mode 100644 index 00000000..0342a4b9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChangeType.html @@ -0,0 +1,147 @@ + + + + + + + + Enum FileChangeType + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileEvent.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileEvent.html new file mode 100644 index 00000000..c13d46b9 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileEvent.html @@ -0,0 +1,214 @@ + + + + + + + + Class FileEvent + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FilePosition.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FilePosition.html new file mode 100644 index 00000000..3eef8d2b --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FilePosition.html @@ -0,0 +1,381 @@ + + + + + + + + Class FilePosition + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Location.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Location.html new file mode 100644 index 00000000..55c9e5a2 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Location.html @@ -0,0 +1,216 @@ + + + + + + + + Class Location + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Position.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Position.html new file mode 100644 index 00000000..51801dde --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Position.html @@ -0,0 +1,216 @@ + + + + + + + + Class Position + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range.html new file mode 100644 index 00000000..fdfca9d1 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range.html @@ -0,0 +1,208 @@ + + + + + + + + Struct Range + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.html new file mode 100644 index 00000000..784e5da2 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.html @@ -0,0 +1,965 @@ + + + + + + + + Class ScriptFile + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarker.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarker.html new file mode 100644 index 00000000..29386997 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarker.html @@ -0,0 +1,250 @@ + + + + + + + + Class ScriptFileMarker + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarkerLevel.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarkerLevel.html new file mode 100644 index 00000000..8dc9b257 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarkerLevel.html @@ -0,0 +1,151 @@ + + + + + + + + Enum ScriptFileMarkerLevel + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptRegion.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptRegion.html new file mode 100644 index 00000000..a4b9331a --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptRegion.html @@ -0,0 +1,403 @@ + + + + + + + + Class ScriptRegion + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolInformation.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolInformation.html new file mode 100644 index 00000000..99234a02 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolInformation.html @@ -0,0 +1,274 @@ + + + + + + + + Class SymbolInformation + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolKind.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolKind.html new file mode 100644 index 00000000..2c238b73 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolKind.html @@ -0,0 +1,207 @@ + + + + + + + + Enum SymbolKind + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentChangeEvent.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentChangeEvent.html new file mode 100644 index 00000000..023eac21 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentChangeEvent.html @@ -0,0 +1,250 @@ + + + + + + + + Class TextDocumentChangeEvent + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentIdentifier.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentIdentifier.html new file mode 100644 index 00000000..9dc7c05e --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentIdentifier.html @@ -0,0 +1,188 @@ + + + + + + + + Class TextDocumentIdentifier + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentItem.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentItem.html new file mode 100644 index 00000000..2ecec21d --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentItem.html @@ -0,0 +1,280 @@ + + + + + + + + Class TextDocumentItem + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentPosition.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentPosition.html new file mode 100644 index 00000000..b3d5ef83 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentPosition.html @@ -0,0 +1,218 @@ + + + + + + + + Class TextDocumentPosition + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.VersionedTextDocumentIdentifier.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.VersionedTextDocumentIdentifier.html new file mode 100644 index 00000000..15301192 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.VersionedTextDocumentIdentifier.html @@ -0,0 +1,190 @@ + + + + + + + + Class VersionedTextDocumentIdentifier + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolParams.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolParams.html new file mode 100644 index 00000000..e22b85bd --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolParams.html @@ -0,0 +1,184 @@ + + + + + + + + Class WorkspaceSymbolParams + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolRequest.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolRequest.html new file mode 100644 index 00000000..d5417b87 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolRequest.html @@ -0,0 +1,183 @@ + + + + + + + + Class WorkspaceSymbolRequest + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.html new file mode 100644 index 00000000..fd5bcd02 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.html @@ -0,0 +1,201 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Workspace.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Workspace.html new file mode 100644 index 00000000..0b4367ae --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.Workspace.html @@ -0,0 +1,469 @@ + + + + + + + + Class Workspace + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.ConfigChangeCallback.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.ConfigChangeCallback.html new file mode 100644 index 00000000..4defdbb0 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.ConfigChangeCallback.html @@ -0,0 +1,169 @@ + + + + + + + + Delegate WorkspaceService<TConfig>.ConfigChangeCallback + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocChangeCallback.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocChangeCallback.html new file mode 100644 index 00000000..27c95b68 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocChangeCallback.html @@ -0,0 +1,163 @@ + + + + + + + + Delegate WorkspaceService<TConfig>.TextDocChangeCallback + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocCloseCallback.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocCloseCallback.html new file mode 100644 index 00000000..91c0e953 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocCloseCallback.html @@ -0,0 +1,163 @@ + + + + + + + + Delegate WorkspaceService<TConfig>.TextDocCloseCallback + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocOpenCallback.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocOpenCallback.html new file mode 100644 index 00000000..b20c8fd2 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocOpenCallback.html @@ -0,0 +1,163 @@ + + + + + + + + Delegate WorkspaceService<TConfig>.TextDocOpenCallback + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.html new file mode 100644 index 00000000..1af87654 --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.html @@ -0,0 +1,457 @@ + + + + + + + + Class WorkspaceService<TConfig> + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.html new file mode 100644 index 00000000..34ac53ff --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.Workspace.html @@ -0,0 +1,138 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer.Workspace + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/Microsoft.SqlTools.ServiceLayer.html b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.html new file mode 100644 index 00000000..026c8ced --- /dev/null +++ b/docs/_site/api/Microsoft.SqlTools.ServiceLayer.html @@ -0,0 +1,119 @@ + + + + + + + + Namespace Microsoft.SqlTools.ServiceLayer + + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/index.html b/docs/_site/api/index.html new file mode 100644 index 00000000..9a3608b0 --- /dev/null +++ b/docs/_site/api/index.html @@ -0,0 +1,114 @@ + + + + + + + + API Reference + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/api/toc.html b/docs/_site/api/toc.html new file mode 100644 index 00000000..d56c4925 --- /dev/null +++ b/docs/_site/api/toc.html @@ -0,0 +1,1722 @@ + + + + + + + + Table of Content + + + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ + +
+ + + + + + \ No newline at end of file diff --git a/docs/_site/guide/introduction.html b/docs/_site/guide/introduction.html new file mode 100644 index 00000000..7ff31e37 --- /dev/null +++ b/docs/_site/guide/introduction.html @@ -0,0 +1,121 @@ + + + + + + + + Introduction + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/guide/toc.html b/docs/_site/guide/toc.html new file mode 100644 index 00000000..e22442ed --- /dev/null +++ b/docs/_site/guide/toc.html @@ -0,0 +1,84 @@ + + + + + + + + Table of Content + + + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ + +
+ + + + + + \ No newline at end of file diff --git a/docs/_site/guide/using_the_dotnet_api.html b/docs/_site/guide/using_the_dotnet_api.html new file mode 100644 index 00000000..fcd294d7 --- /dev/null +++ b/docs/_site/guide/using_the_dotnet_api.html @@ -0,0 +1,112 @@ + + + + + + + + Using the SQL Tools Service .NET API + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/index.html b/docs/_site/index.html new file mode 100644 index 00000000..ed0f0fd7 --- /dev/null +++ b/docs/_site/index.html @@ -0,0 +1,114 @@ + + + + + + + + SQL Tools Service + + + + + + + + + + + + + +
+
+ + + + +
+ + + +
+ + + + + + diff --git a/docs/_site/manifest.json b/docs/_site/manifest.json new file mode 100644 index 00000000..4636ae69 --- /dev/null +++ b/docs/_site/manifest.json @@ -0,0 +1 @@ +{"homepages":[],"source_base_path":"D:/xplat/sqltoolsservice/docs","xrefmap":"xrefmap.yml","files":[{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingContext.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingContext.html","hash":"2SjXr+2fhkt/8AZa58j3LA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingQueue.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.ConnectedBindingQueue.html","hash":"xaODDxZBCLkRFtoE+pllaQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItem.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItem.html","hash":"lbcUS45Epal2YLP7OjfrhA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItemKind.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionItemKind.html","hash":"Ou9YDGQT+v2YqSrvHivXBA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionRequest.html","hash":"G/8GWg80+lI2DXtx7z5PVg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionResolveRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.CompletionResolveRequest.html","hash":"OCMDwaPOXnDk8gK/n7O2Qg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionError.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionError.html","hash":"6zNZHD/6WMH7U1T4fsy95A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DefinitionRequest.html","hash":"1U75zKo2YqXtsQjHWPE/4Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Diagnostic.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Diagnostic.html","hash":"fXz+1RFido6t1ijl8/YSow=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DiagnosticSeverity.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DiagnosticSeverity.html","hash":"hDrHdolWc9ey35WToRmCuQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlight.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlight.html","hash":"rt895kfh5nnYT0x4E26KEg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightKind.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightKind.html","hash":"1IphRaJ2QUV2lt7TlvCXew=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.DocumentHighlightRequest.html","hash":"tYLHXcYV2vtYTKTDm6f6JA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ExpandAliasRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ExpandAliasRequest.html","hash":"Jqj1VlzXOySY5SmiTFVGNw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.FindModuleRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.FindModuleRequest.html","hash":"j224l06ohLgIJsDzxo47iA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Hover.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.Hover.html","hash":"VbsungAot5V+Yly4wt/pgw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.HoverRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.HoverRequest.html","hash":"6irUOyULiI0w6PW2xFRwQA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyNotification.html","hash":"zOqSgUoUWU4N6V7QndYSaw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.IntelliSenseReadyParams.html","hash":"DiJyFh7ajAm1TR4vQZLhZw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.MarkedString.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.MarkedString.html","hash":"eUSTdmTrAL83NESfOKnxNw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ParameterInformation.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ParameterInformation.html","hash":"zDO6Tp9b1a5zSQpa/Z6BMg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PSModuleMessage.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PSModuleMessage.html","hash":"8S3iVMBFiedNbxIQ1I3OlA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PublishDiagnosticsNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.PublishDiagnosticsNotification.html","hash":"7AVwFAVqqP2L0BC4SxN/Lg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesContext.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesContext.html","hash":"5dKfc19nRhs9MaaWzpTyyA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesParams.html","hash":"MvK90xCnUhf5Y/Ozlto5VA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ReferencesRequest.html","hash":"5XNbsBrShIU/IzOLQQxsdw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ShowOnlineHelpRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.ShowOnlineHelpRequest.html","hash":"KUW8MqtpjtfmMk79XqmPww=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelp.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelp.html","hash":"n18EjnI9OxtArQXGYPnSuQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelpRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureHelpRequest.html","hash":"TcjHC5byxGynKbCmKOPhKw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureInformation.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.SignatureInformation.html","hash":"is1Dv8chSyCQQDTK5N8XUA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangedNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangedNotification.html","hash":"QKzcHCls56BO8pfUMlv9fQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangeParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.StatusChangeParams.html","hash":"nfaHcScliun/Rl/vNBKDzw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResult.html","hash":"+iKv4KFbe+oGjSt5B+bCKQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.html","hash":"WyNNouOJ8I5+cEpeLguJLg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChange.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChange.html","hash":"SkScC+Y+wbQ2iGR7R1Xc1w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteEvent.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteEvent.html","hash":"OIeoBpJTnji/6wYkYsiJnQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteResultSetCompleteParams.html","hash":"Vzenulr8w+JdcVIyRqsTJw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetParams.html","hash":"0fraxcPfvMVSAsK4gBxvAw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetRequest.html","hash":"y9SmHcspd0X9xr85SovdxA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteSubsetResult.html","hash":"VnjOokLNaNcdG4xChCCi3Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultMessage.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultMessage.html","hash":"YM57YUEuiHCTniFAm2/nxQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSubset.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSubset.html","hash":"s2F6DiiBQNxm+ML+fmJk/g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSummary.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ResultSetSummary.html","hash":"+2ceZaayi/DeACqTo0DXoQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestError.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestError.html","hash":"YzcFQyr8TkVG7iYVbxRlNQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultRequestResult.html","hash":"y83Hhmp1sVyNaFwAiUuTPg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequest.html","hash":"0WnykTKZNv/WOppZJPCLgA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequestParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsCsvRequestParams.html","hash":"KbDsf9NTXcgb1KgBhOsNTQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequest.html","hash":"zzLKO5EX9LwuqcfuyMUsSQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequestParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsAsJsonRequestParams.html","hash":"SGaM1NaeVjBpcdFUs4dGig=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsRequestParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SaveResultsRequestParams.html","hash":"lQgq78e0NesjLUcG/0xI0Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SelectionData.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.SelectionData.html","hash":"fk2FhHK67hJP+1YGLV+sRA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.html","hash":"DMjKTN0el2grUsW9hRVrLw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.FileStreamReadResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.FileStreamReadResult.html","hash":"NgRcPgwrEA5y+hFyq3GwJQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamFactory.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamFactory.html","hash":"b4jJqfSTbRGx2xJpVZd7Fg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamReader.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamReader.html","hash":"qtsLLV1J9W+AGf8u8mBzSQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamWriter.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.IFileStreamWriter.html","hash":"diIfFW9gG2bVjF/8uepw1g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamFactory.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamFactory.html","hash":"GcZNe27BNKYqZDg+S+uGRA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamReader.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamReader.html","hash":"FwCWdQR/1Vhwb8PiXjS/9g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamWriter.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.ServiceBufferFileStreamWriter.html","hash":"Z/qHi+ZVKXuQO7bnvs5P7w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.StorageDataReader.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.StorageDataReader.html","hash":"hdp8n7dds464aRDYt7Ju5A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage.html","hash":"eDKFyxd8xROZdy1d6c01rA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncErrorEventHandler.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncErrorEventHandler.html","hash":"HqJVb38GWUqrXW1PLo5D7w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncEventHandler.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.QueryAsyncEventHandler.html","hash":"250xdSBVkKTJzg0bx/7VSg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Query.html","hash":"UHkAp58Skm6x4exzPYS47Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.QueryExecutionService.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.QueryExecutionService.html","hash":"BjVORo+fDML7a1ypw0f6lg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.ResultSetAsyncEventHandler.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.ResultSet.ResultSetAsyncEventHandler.html","hash":"gS2clh6GQwahFhwAj/UBxw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message.html","hash":"ZEqt1rwDRL73qObcT7Lp2w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.MessageType.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.MessageType.html","hash":"vRH4LHfcgZOBejNTuo2CMQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.RequestType-2.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.RequestType-2.html","hash":"ikWfbH0ZHLBhsZ1/WajBgw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.html","hash":"dTbu//3p0shxpBkFy+DU3w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.EventContext.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.EventContext.html","hash":"5qzmCIKUVd1v0ZI0mHiwlA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IMessageSender.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IMessageSender.html","hash":"syWIBYCcemMMntgAs0DH8w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IProtocolEndpoint.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.IProtocolEndpoint.html","hash":"WqvzkXKyCdIwS1zemIZTBQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageDispatcher.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageDispatcher.html","hash":"gOyJuaKuVRVCp4fQTWcTuA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageParseException.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageParseException.html","hash":"quVG84+3w5V1PvxdpWnyZQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageProtocolType.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageProtocolType.html","hash":"McSBSfsVwUGYOOBYzP6F4w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageReader.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageReader.html","hash":"nH7epFoRAyj5PKQHKxRyyQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageWriter.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.MessageWriter.html","hash":"hM/C2iKHMKw4jDZt1dtFxg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.ProtocolEndpoint.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.ProtocolEndpoint.html","hash":"0wh+O3keqocFIeCn9IxAGQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.RequestContext-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.RequestContext-1.html","hash":"q36Dgr4BIHC5zrSCq4XGkQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.IMessageSerializer.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.IMessageSerializer.html","hash":"nB8CRnix0o0RtySn8loqdg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.JsonRpcMessageSerializer.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.JsonRpcMessageSerializer.html","hash":"YfOTjisx3OyQZ640uav5wA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.V8MessageSerializer.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.V8MessageSerializer.html","hash":"2h13izC+qMIg31VtjabzIw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers.html","hash":"WMvHFEbzEW9YmPE0+fsN5w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.html","hash":"KWj7UlxZe7Y5H2azvri2nA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.InitializeCallback.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.InitializeCallback.html","hash":"l6sbMspq4UL6lV0elS7K/g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.ShutdownCallback.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.ShutdownCallback.html","hash":"azY5Tvr93FbBT3lJBqdw6g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost.html","hash":"xk9QLJdFW9YgdRRickdKfQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHostBase.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHostBase.html","hash":"XByVADVTivs2+ZMk0cGW8Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.html","hash":"cctnHzV80B1MZFoLmN50vQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.InteractionMetrics-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.InteractionMetrics-1.html","hash":"y7lH7nxjutJsaK0Ch05cGw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.AutoCompleteHelper.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.AutoCompleteHelper.html","hash":"M3EwbgSYxPisVx5qNQc46w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.BindingQueue-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.BindingQueue-1.html","hash":"ZAcABgZjojfr4axWHmdRSw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.AutoCompletionResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.AutoCompletionResult.html","hash":"K4cw2yfmhXF73ewfIMFPJg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.ISqlParserWrapper.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.ISqlParserWrapper.html","hash":"y34WX7kZ51CqZkkH315MiA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlCompletionItem.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlCompletionItem.html","hash":"XZs1VSYLa6RuF7sc1rxGLg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlParserWrapper.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.SqlParserWrapper.html","hash":"+bhUwxSM5TPXoZ8MXdTjLA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionInfo.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionInfo.html","hash":"VpKMKD4B4jGyE90kuQZkfw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnConnectionHandler.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnConnectionHandler.html","hash":"Y/4CJkMCJkxs/47QNG/CVw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnDisconnectHandler.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.OnDisconnectHandler.html","hash":"bN8lTwmnTqpE6OU8383sfQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.html","hash":"/qFrmCNswibK2XknMFZiPw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectParams.html","hash":"lklMHeodaG4KlVaAqSfGBg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.CancelConnectRequest.html","hash":"J+oQX1GDuaIAo4ZOVcIkZA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedNotification.html","hash":"bksxfnR/YtOYk4JxGDCSjw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionChangedParams.html","hash":"j18KF1eE0YHUgKBeOqttPg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteNotification.html","hash":"E/FYAt4ZFDDbhNRppZ4X9A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionCompleteParams.html","hash":"k1AwOtfz+4VehnNbaEn77A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetails.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetails.html","hash":"0vtspvAhTcZ0qq+XF2J/WQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetailsExtensions.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionDetailsExtensions.html","hash":"aSsi/0KGXvix53X0qsgjbQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionRequest.html","hash":"e1n93MMaLVP/+hinVOtfEg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummary.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummary.html","hash":"xAwiTVyE++eJD97QJYJK8Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryComparer.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryComparer.html","hash":"RVuGxdTJZYCm1/NT0LeeFg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryExtensions.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectionSummaryExtensions.html","hash":"r7yXzJZniQUkUYMrKzqNIQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParams.html","hash":"uDneZVoGKqyvsIZXKzcetA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParamsExtensions.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ConnectParamsExtensions.html","hash":"ZUE9Z9r2MzZ7HgXNeF7C3A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectParams.html","hash":"WzNLins2PHc3UTjnMXH1mw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.DisconnectRequest.html","hash":"DScXWVEsOtXy2p77hu/OQA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesParams.html","hash":"O6cGXif++MguxPeX7cHOjg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesRequest.html","hash":"06uKfs6Imowz+HWkDyh3yg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesResponse.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ListDatabasesResponse.html","hash":"kcBBVSOF+GPWsrvMpmczYg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ServerInfo.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.ServerInfo.html","hash":"zgmiadzVE6txFsVt15xGNA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.Contracts.html","hash":"xBAIZ/CZHLFBQKk6oYfSbQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.ISqlConnectionFactory.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.ISqlConnectionFactory.html","hash":"j8FpAk3Nu3K2b3XCu2FoEA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.SqlConnectionFactory.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.SqlConnectionFactory.html","hash":"gO13CTr5F4AjIjq0Zi4Kzw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Connection.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Connection.html","hash":"L8jCH3vkJ4t02lemBL74dw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.Credential.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.Credential.html","hash":"xwr/DFyv6OCJsCI5B5UMbw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.DeleteCredentialRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.DeleteCredentialRequest.html","hash":"T7Tz2xByvbGmeaqhhlJ85w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.ReadCredentialRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.ReadCredentialRequest.html","hash":"6U3cWOjs+JG0dzh2MB2KgA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.html","hash":"rKeJzByrxExxNAQUt9SeRQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.SqlContext.HostDetails.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.SqlContext.HostDetails.html","hash":"t4Nq8HFwnymqzU3cj56v2g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.SqlContext.IntelliSenseSettings.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.SqlContext.IntelliSenseSettings.html","hash":"egX0ki0k0BtNxLMX3fW17A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.SqlContext.QueryExecutionSettings.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.SqlContext.QueryExecutionSettings.html","hash":"AOnHx1Zv29PcpJorQCKSZA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsContext.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsContext.html","hash":"pMjHIfpMJOISunzPkInQLw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettings.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettings.html","hash":"BZtucRSRvaZHi8r5Xzg8lQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettingsValues.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.SqlContext.SqlToolsSettingsValues.html","hash":"IcYmW5VidQY6qm0tRACQuA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.SqlContext.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.SqlContext.html","hash":"HoD6AsCyF2TMBL1HrxJM4g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContext.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContext.html","hash":"2/6jmc9NqNDeiCGsCvSWcQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContextThread.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncContextThread.html","hash":"aD8+mwzWg5brznAR/gdiHQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncLock.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncLock.html","hash":"KxAUzyCHQ2adcUEN9DXkQg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncQueue-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.AsyncQueue-1.html","hash":"GBaTvT/120wUceIpZxH/LQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.Logger.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.Logger.html","hash":"6FmtGyJbYBmeaj/4laYneA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.LogLevel.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.LogLevel.html","hash":"32OBwfgf8t9QZk9X96orSw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.LongListEnumerator-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.LongListEnumerator-1.html","hash":"7uI+iPrVF0d5Tl2/+/AHoQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.LongList-1.html","hash":"NVgv4X2ln8ZOMfeBnl9srA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.TextUtilities.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.TextUtilities.html","hash":"+a2adkIR5os+dryau9r5Ow=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.ThreadSynchronizationContext.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.ThreadSynchronizationContext.html","hash":"seaY1+N1yc3wcaXxKinr8g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.Validate.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.Validate.html","hash":"QIviDX0KtVH3LXvv30g0Fw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Utility.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Utility.html","hash":"5KHnhADOZblSDgJ9+jW57A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferPosition.html","hash":"UUKC30PFB2vCOnMTq5SI6Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.BufferRange.html","hash":"Bx0KSgL938imQ5QMomIhUg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationNotification-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationNotification-1.html","hash":"xdlr8Y6KO3iub0NJgc1RLw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationParams-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeConfigurationParams-1.html","hash":"oSNjeXtmCOCisVKNR1OVOw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentNotification.html","hash":"udxuNC4sCCCErUW3yfijKg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidChangeTextDocumentParams.html","hash":"VOx2lrsCjpRZxi3TC2KmkQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentNotification.html","hash":"bas9jTPYqTbzne1L0uWXsQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidCloseTextDocumentParams.html","hash":"83mjZw69+00v+nTpKViTdg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidOpenTextDocumentNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DidOpenTextDocumentNotification.html","hash":"8GN5c6B0G85N8TsuAAMaaQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolParams.html","hash":"i0v1xmm2oT2fZ9U90od5YQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.DocumentSymbolRequest.html","hash":"Y3X9JTJc4HqCmd9oJBg40g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.html","hash":"Hh3fNIX8TRJSjFKV4hJ9Ow=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.CredentialService.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.CredentialService.html","hash":"sIXgl0qkG5HrII1MRIMEJw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.ICredentialStore.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.ICredentialStore.html","hash":"hxZNyWjXKG+zEPgYWRrVdw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.CredentialsWrapper.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.CredentialsWrapper.html","hash":"InLTPXT7RQMwjjDQRZP84w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.FileTokenStorage.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.FileTokenStorage.html","hash":"M+dLNio85ErQf3m9jNT74A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Linux.html","hash":"+ueVhdvXm67lx6uLNvXHPw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialSet.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialSet.html","hash":"3Nis4QSnUj1QeDJMM2u01A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialType.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.CredentialType.html","hash":"OaE1B0ma40b85+w1E9vUbA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.PersistanceType.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.PersistanceType.html","hash":"+zqJ1xY40IyeKsuw8A9KQQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.Win32Credential.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.Win32Credential.html","hash":"9TKL03/mYn+oimnszC/gmA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Win32.html","hash":"+8JTrvYg+I/coNiVEaljNA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.html","hash":"19IOTvxhTDXJifgNM8LlNw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ClientCapabilities.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ClientCapabilities.html","hash":"2kRspRjmhF8iNlNOsLFyxg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.CompletionOptions.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.CompletionOptions.html","hash":"CwCmVA8OEJacs+2kdgaeMw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ExitNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ExitNotification.html","hash":"VTNAHkCenyEtQ6fHY3uEQg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorEvent.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorEvent.html","hash":"SrjtGgdoMUeeCEE9RNyDSA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.HostingErrorParams.html","hash":"TEaK2mUD7vR2FdAZxY0Eig=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeError.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeError.html","hash":"REgSybR74ogIIkBGQe55qw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeRequest.html","hash":"iWX88zqfvOPPTCrazadyHA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.InitializeResult.html","hash":"M1ebUrfjfdvXhecD+Ygs/A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ServerCapabilities.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ServerCapabilities.html","hash":"8TeJ6Jfw43RixdUjmIYeBA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ShutdownRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.ShutdownRequest.html","hash":"Y//CJ8gx6dQz1odeNYTEKg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.SignatureHelpOptions.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.SignatureHelpOptions.html","hash":"cIhvZvAlWKBSPuP2YR2i4g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.TextDocumentSyncKind.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.TextDocumentSyncKind.html","hash":"TPON/dWdvYLevrZ2WqpmAQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.VersionRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.VersionRequest.html","hash":"SQxhbeORgaK7sf+XixbOMQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Contracts.html","hash":"PoSaXQMUZH42Nj5399wDYw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.ChannelBase.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.ChannelBase.html","hash":"fMEzPoQ3wC7Wrk+BT3aBeA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioClientChannel.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioClientChannel.html","hash":"k+xloUTOMN3vxGell6MJjQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioServerChannel.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.StdioServerChannel.html","hash":"O5jIpEOQB9qxsNot14BZPw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel.html","hash":"Og1LwI/fTkGp26m2v4zDxw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Constants.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Constants.html","hash":"ft6XYa+L6kI/L64rxplLiA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.EventType-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.EventType-1.html","hash":"G0FyO7bZSE60tmyvgcO2wQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.html","hash":"sA1YI+DgZobLnU66veK2Iw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.SaveCredentialRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Credentials.Contracts.SaveCredentialRequest.html","hash":"7SDNrdy3KSzlU6v2sF2Smg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryEventNames.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryEventNames.html","hash":"qoRijSlpZzgFeCt6dZ2wiw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryNotification.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryNotification.html","hash":"DXus6QmeqcCPhj0DZPZcOQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryParams.html","hash":"yIu1NWHShut+44F22cl6wg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryProperties.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TelemetryProperties.html","hash":"uTMeEOwC+F37e/j3+8kgxw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TextEdit.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.TextEdit.html","hash":"orin2WO5LumVBsSxMs42nQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts.html","hash":"y5iaJuL82y0PE87qwfTdJQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DefinitionResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DefinitionResult.html","hash":"P3xMZouVCxvcyAOj0OhmMA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DiagnosticsHelper.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DiagnosticsHelper.html","hash":"o3r+zvBYOmFbsyxfVO9lBQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DocumentStatusHelper.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.DocumentStatusHelper.html","hash":"bmlc7/ACTThvAj8D6SQUoA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.IBindingContext.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.IBindingContext.html","hash":"2s4yAs0TiXqurmLQqtKP7A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.html","hash":"5jADDdt3OvbgtnVMTv62lA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.QueueItem.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.QueueItem.html","hash":"U1ytqKIKZao+qenSLj1eEw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.LanguageServices.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.LanguageServices.html","hash":"KNsggSo501W0MKSin7F2Ag=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.BatchAsyncEventHandler.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.BatchAsyncEventHandler.html","hash":"PvexREajD/gjldWEzULTBg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Batch.html","hash":"Vmqo8ZV+oIN2RA/dsBUg5g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.BatchSummary.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.BatchSummary.html","hash":"RNZhKt+dKpeWsgyo1wga2Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbCellValue.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbCellValue.html","hash":"qELQ7cC+S2yDLZeGS/uxKw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbColumnWrapper.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.DbColumnWrapper.html","hash":"nxkvq4wgz6rfhvSc5eFCGA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelParams.html","hash":"H+AAaPBFJYCLqiWow7t5bw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelRequest.html","hash":"RoTOeKJLvqvz3q3P5z3N+A=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryCancelResult.html","hash":"PCFs57K5Djb1/RtEIEjquw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeParams.html","hash":"0LzkLMJyzTJVspR3EDfg8w=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeRequest.html","hash":"FSCeez3jaz0Z73v0IUBdqA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeResult.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryDisposeResult.html","hash":"tQCf8PHoaiJxvNUwg4XnDg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchCompleteEvent.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchCompleteEvent.html","hash":"DG6eGB1pt2XATeuPS/I81g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchNotificationParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchNotificationParams.html","hash":"9LFL9bY0OuaxVqOtYdt/tg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchStartEvent.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteBatchStartEvent.html","hash":"b0T8Ri4WKX+frdCuX8F1QQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteEvent.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteEvent.html","hash":"xYKG8jclUCAmtO0ccPNZbw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteCompleteParams.html","hash":"M/Jr6wCRy7exRI0BMjxPTg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteParams.html","hash":"FbjfavTM/Y6kO2iOyeIfVg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.QueryExecuteRequest.html","hash":"4ImaYRrleNuhwJMpYirNgw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChangeType.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileChangeType.html","hash":"QCvVUuLdifXt+IVuEbdrRg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileEvent.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FileEvent.html","hash":"auQZ841j5s8I6J8GTf47VQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FilePosition.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.FilePosition.html","hash":"Pt5h8p9rpo+kxT1Bb111vQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Location.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Location.html","hash":"/b1lMD9mEDU0J3IgE6agfg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Position.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Position.html","hash":"Pg/6ja9rgL1xc5jEkkHtRg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range.html","hash":"YREnUFin1B5fdoAki8g0DA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFile.html","hash":"5LMZgN8DA4zbuf+Iv9erGg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarker.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarker.html","hash":"0szxl3PrjoH8xv7xo/9YyA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarkerLevel.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptFileMarkerLevel.html","hash":"QUZdmVavf30vfvLh6TKFgA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptRegion.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.ScriptRegion.html","hash":"zpVbuVNpgnb51yldz+fGLA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolInformation.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolInformation.html","hash":"Tdym1IncOnMOPiXcPab4Vg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolKind.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.SymbolKind.html","hash":"Fdy433MRKvp43VCTIZDX/g=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentChangeEvent.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentChangeEvent.html","hash":"XnEAiqkLnWtmqFcHwBG7yQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentIdentifier.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentIdentifier.html","hash":"6edKT+fwoVtmF+FDVE8zNw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentItem.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentItem.html","hash":"k8UfPR9qGpu5hgQlTPRMIg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentPosition.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.TextDocumentPosition.html","hash":"ZpSyZReRlbxxyfWNImK8jw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.VersionedTextDocumentIdentifier.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.VersionedTextDocumentIdentifier.html","hash":"JQq0+i94Nw5fv2AFJgdMvg=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolParams.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolParams.html","hash":"fVI8Ql47daXBSeJcID4vbQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolRequest.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.WorkspaceSymbolRequest.html","hash":"jTZAB062oJZenjqWZcsY/Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.html","hash":"QtugPlFap4MxzE7RY89DBw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.Workspace.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.Workspace.html","hash":"hPh0onQyIVim6X+/+z55+Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.ConfigChangeCallback.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.ConfigChangeCallback.html","hash":"wzFWED0SGAkyqfBAGNCsAw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocChangeCallback.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocChangeCallback.html","hash":"BD3qEE7AEthBa82A4ZZweA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocCloseCallback.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocCloseCallback.html","hash":"owD/gjQJCWDrqu4KULVLLQ=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocOpenCallback.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.TextDocOpenCallback.html","hash":"d07goOkf0KrpNsOHdh25uw=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.WorkspaceService-1.html","hash":"g5ePEk/cmKY8bO1QzZAu0Q=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.Workspace.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.Workspace.html","hash":"Z2xUvYc8pu+VHuCGHiZkyA=="}},"is_incremental":false},{"type":"ManagedReference","source_relative_path":"metadata/api/Microsoft.SqlTools.ServiceLayer.yml","output":{".html":{"relative_path":"api/Microsoft.SqlTools.ServiceLayer.html","hash":"AhwJg4funOWVG2BiW5nZRA=="}},"is_incremental":false},{"type":"Toc","source_relative_path":"metadata/api/toc.yml","output":{".html":{"relative_path":"api/toc.html","hash":"npuPWTsjvYxhm+z9X6edmg=="}},"is_incremental":false},{"type":"Toc","source_relative_path":"toc.yml","output":{".html":{"relative_path":"toc.html","hash":"dPXO46P1nLb+kolMZRbYLA=="}},"is_incremental":false},{"type":"Toc","source_relative_path":"guide/toc.md","output":{".html":{"relative_path":"guide/toc.html","hash":"FJQJcyiphfaMev1dVFaMLw=="}},"is_incremental":false},{"type":"Conceptual","source_relative_path":"index.md","output":{".html":{"relative_path":"index.html","hash":"QGGf8wsttuL46BbXX1SHGw=="}},"is_incremental":false},{"type":"Conceptual","source_relative_path":"api/index.md","output":{".html":{"relative_path":"api/index.html","hash":"Hn/sgIvTqFuoNO8MMWTDOQ=="}},"is_incremental":false},{"type":"Conceptual","source_relative_path":"guide/introduction.md","output":{".html":{"relative_path":"guide/introduction.html","hash":"Qmu7Ffwx7wyKGOrrJRwREg=="}},"is_incremental":false},{"type":"Conceptual","source_relative_path":"guide/using_the_dotnet_api.md","output":{".html":{"relative_path":"guide/using_the_dotnet_api.html","hash":"KMlhgAT8L4ZRur6Ca4gnBg=="}},"is_incremental":false}]} diff --git a/docs/_site/styles/main.css b/docs/_site/styles/main.css new file mode 100644 index 00000000..e69de29b diff --git a/docs/_site/toc.html b/docs/_site/toc.html new file mode 100644 index 00000000..bb181f79 --- /dev/null +++ b/docs/_site/toc.html @@ -0,0 +1,84 @@ + + + + + + + + Table of Content + + + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ + +
+ + + + + + \ No newline at end of file diff --git a/docs/api/index.md b/docs/api/index.md deleted file mode 100644 index 26ae2846..00000000 --- a/docs/api/index.md +++ /dev/null @@ -1,8 +0,0 @@ -# API Reference - -The .NET API for SQL Tools Service is organized in a way that allows -you to easily get started using all of its services but also giving you the -option to only use the services you care about in your application. - -Use the @Microsoft.SqlTools.ServiceLayer.LanguageServices to provide language -intelligence behaviors like finding the references or definition of a cmdlet or variable. diff --git a/docs/guide/introduction.md b/docs/guide/introduction.md index d86c1a14..ddc6cde0 100644 --- a/docs/guide/introduction.md +++ b/docs/guide/introduction.md @@ -11,6 +11,9 @@ and management tools. The SQL Tools Service exposes its feature set as a JSON-RPC over stdio. See the API details at [JSON-RPC Protocol](jsonrpc_protocol.md) and checkout some usage examples at [Using the JSON-RPC API](using_the_jsonrpc_api.md). +======= +SQL Tools Service is a tool that provides useful services to code +editors that need a great PowerShell editing experience. ## The .NET API @@ -19,3 +22,7 @@ code editors or any other type of application. If you're a developer that would like to use SQL Tools Service in a .NET application, checkout the [.Net API reference](../api/index.md). +======= +If you're a developer that would like to use PowerShell Editor Services in +a .NET application, read the page titled [Using the .NET API](using_the_dotnet_api.md) +to learn more. diff --git a/docs/guide/toc.md b/docs/guide/toc.md index 7bd67113..ab8a15a8 100644 --- a/docs/guide/toc.md +++ b/docs/guide/toc.md @@ -2,3 +2,4 @@ # [SQL Tools JSON-RPC Protocol](jsonrpc_protocol.md) # [Using the JSON-RPC API](using_the_jsonrpc_api.md) # [Building the SQL Tools API](building_sqltoolsservice.md) +# [Using the .NET API](using_the_dotnet_api.md) diff --git a/docs/images/sqlserver.png b/docs/images/sqlserver.png deleted file mode 100644 index d884faa1..00000000 Binary files a/docs/images/sqlserver.png and /dev/null differ diff --git a/docs/index.md b/docs/index.md index 60ac90da..f71404c9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,6 +14,7 @@ The .Net API Reference contains details about the .NET API. ## [Design](design/index.md) Design and implementation documentation for the SQL Tools Service SDK. +The API Reference contains details about the .NET API. ## Getting Help diff --git a/docs/template/conceptual.html.primary.tmpl b/docs/template/conceptual.html.primary.tmpl deleted file mode 100644 index bea04931..00000000 --- a/docs/template/conceptual.html.primary.tmpl +++ /dev/null @@ -1,55 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} -{{!include(/^styles/.*/)}} -{{!include(/^fonts/.*/)}} -{{!include(favicon.ico)}} -{{!include(logo.svg)}} - - - - {{>partials/head}} - -
-
- {{^_disableNavbar}} - {{>partials/navbar}} - {{/_disableNavbar}} - {{^_disableBreadcrumb}} - {{>partials/breadcrumb}} - {{/_disableBreadcrumb}} -
-
- {{^_disableToc}} - {{>partials/toc}} -
- {{/_disableToc}} - {{#_disableToc}} -
- {{/_disableToc}} - {{#_disableAffix}} -
- {{/_disableAffix}} - {{^_disableAffix}} -
- {{/_disableAffix}} -
- {{^_disableContribution}} - {{#docurl}} - Improve this Doc - {{/docurl}} - {{/_disableContribution}} - {{{rawTitle}}} - {{{conceptual}}} -
-
- {{^_disableAffix}} - {{>partials/affix}} - {{/_disableAffix}} -
-
- {{^_disableFooter}} - {{>partials/footer}} - {{/_disableFooter}} -
- {{>partials/scripts}} - - diff --git a/docs/template/partials/class.tmpl.partial b/docs/template/partials/class.tmpl.partial deleted file mode 100644 index c898239f..00000000 --- a/docs/template/partials/class.tmpl.partial +++ /dev/null @@ -1,135 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - -{{^_disableContribution}} -{{#docurl}}{{__global.improveThisDoc}}{{/docurl}} -{{#sourceurl}}{{__global.viewSource}}{{/sourceurl}} -{{/_disableContribution}} -

{{>partials/title}}

-
{{{summary}}}
-
{{{conceptual}}}
-{{#inheritance.0}} -
-
{{__global.inheritance}}
-{{#inheritance}} -
{{{specName.0.value}}}
-{{/inheritance}} -
{{item.name.0.value}}
-
-{{/inheritance.0}} -
{{__global.namespace}}:{{namespace}}
-
{{__global.assembly}}:{{assemblies.0}}.dll
-
{{__global.syntax}}
-
-
{{syntax.content.0.value}}
-
-{{#remarks}} -
{{__global.remarks}}
-
{{{remarks}}}
-{{/remarks}} -{{#children}} -

{{>partials/classSubtitle}}

-{{#children}} -{{^_disableContribution}} -{{#docurl}} - - | - {{__global.improveThisDoc}} -{{/docurl}} -{{#sourceurl}} - - {{__global.viewSource}} -{{/sourceurl}} -{{/_disableContribution}} -

{{name.0.value}}

-
{{{summary}}}
-
{{{conceptual}}}
-{{#remarks}} -
{{__global.remarks}}
-
{{{remarks}}}
-{{/remarks}} -
{{__global.declaration}}
-{{#syntax}} -
-
{{syntax.content.0.value}}
-
-{{#parameters.0}} -
{{__global.parameters}}
- - - - - - - - - -{{/parameters.0}} -{{#parameters}} - - - - - - {{/parameters}} - {{#parameters.0}} - -
{{__global.type}}{{__global.name}}{{__global.description}}
{{{type.specName.0.value}}}{{{id}}}{{{description}}}
-{{/parameters.0}} -{{#return}} -
{{__global.returns}}
- - - - - - - - - - - - - -
{{__global.type}}{{__global.description}}
{{{type.specName.0.value}}}{{{description}}}
-{{/return}} -{{#propertyValue}} -
{{__global.provertyValue}}
- - - - - - - - - - - - - -
{{__global.type}}{{__global.description}}
{{{type.specName.0.value}}}{{{description}}}
-{{/propertyValue}} -{{/syntax}} -{{#exceptions.0}} -
{{__global.exceptions}}
- - - - - - - - -{{/exceptions.0}} -{{#exceptions}} - - - - -{{/exceptions}} -{{#exceptions.0}} - -
{{__global.type}}{{__global.condition}}
{{{type.specName.0.value}}}{{{description}}}
-{{/exceptions.0}} -{{/children}} -{{/children}} diff --git a/docs/template/partials/footer.tmpl.partial b/docs/template/partials/footer.tmpl.partial deleted file mode 100644 index 47254342..00000000 --- a/docs/template/partials/footer.tmpl.partial +++ /dev/null @@ -1,7 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - -
- -
diff --git a/docs/template/partials/head.tmpl.partial b/docs/template/partials/head.tmpl.partial deleted file mode 100644 index 95c6b442..00000000 --- a/docs/template/partials/head.tmpl.partial +++ /dev/null @@ -1,28 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - - - - {{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}} - - - {{#_description}}{{/_description}} - - - - - - - - - \ No newline at end of file diff --git a/docs/template/partials/namespace.tmpl.partial b/docs/template/partials/namespace.tmpl.partial deleted file mode 100644 index 1147b227..00000000 --- a/docs/template/partials/namespace.tmpl.partial +++ /dev/null @@ -1,21 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - -{{^_disableContribution}} -{{#docurl}} -{{__global.improveThisDoc}} -{{/docurl}} -{{#sourceurl}} -{{__global.viewSource}} -{{/sourceurl}} -{{/_disableContribution}} -

{{>partials/title}}

-
{{{summary}}}
-
{{{conceptual}}}
-
{{{remarks}}}
-{{#children}} -

{{>partials/namespaceSubtitle}}

- {{#children}} -

{{{specName.0.value}}}

-
{{{summary}}}
- {{/children}} -{{/children}} diff --git a/docs/template/partials/navbar.tmpl.partial b/docs/template/partials/navbar.tmpl.partial deleted file mode 100644 index 0dbc8ba9..00000000 --- a/docs/template/partials/navbar.tmpl.partial +++ /dev/null @@ -1,18 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - diff --git a/docs/template/styles/main.css b/docs/template/styles/main.css deleted file mode 100644 index f9c1549f..00000000 --- a/docs/template/styles/main.css +++ /dev/null @@ -1,268 +0,0 @@ -@import url(//fonts.googleapis.com/css?family=Roboto+Condensed:700); -@import url(//fonts.googleapis.com/css?family=Open+Sans); - -/* Main styles */ -body { - font-family: "Open Sans", "Segoe UI", sans-serif; - font-size: 15px; - padding-top: 50px; -} -ul { - list-style-image: url("../../images/core/list-bullet.png"); -} -nav { - font-size: 14px; -} -.navbar-nav > li > a.nav-active, .navbar-nav > li > a.nav-active:hover { - background-color: #333; - color: #fff; -} - -h1, h2, h3, h4, h5 { - font-family: "Roboto Condensed", "Segoe UI", sans-serif; - font-weight: bold; -} - - -footer { - text-align: center; - width: 100%; - margin-top: 50px; - color: #c0c0c0; -} -footer > .inner-footer a { - color: #c0c0c0; - text-decoration: none; -} -footer > .inner-footer a:hover { - color: #32145a; - text-decoration: none; -} -.content a { - /*color: #A979B3;*/ - color: #A356B3; - text-decoration: none; - outline: 0; -} -.content a:hover { - /*transition: color .15s cubic-bezier(.33, .66, .66, 1);*/ - text-decoration: none; - color: #682079; -} - - -/* End of main styles */ - -/* Index page styles */ -.btn-hero-core { - padding: 15px 25px; - background-color: #32145a; - color: #d89ae4; - display: inline-block; - font-family: "Open Sans", sans-serif; - font-size: 20px; - font-weight: bold; - margin-left: 20px; - -webkit-box-shadow: 2px 2px 3px 0px #2C0D33; /* Safari 3-4, iOS 4.0.2 - 4.2, Android 2.3+ */ - -moz-box-shadow: 2px 2px 3px 0px #2C0D33; /* Firefox 3.5 - 3.6 */ - box-shadow: 2px 2px 3px 0px #2C0D33; /* Opera 10.5, IE 9, Firefox 4+, Chrome 6+, iOS 5 */ -} -.btn-hero-core:hover { - color: #d89ae4; - text-decoration: none; -} -.hero { - background-color: #682079; - width: inherit; - color: #fff; -} -.starter-template { - padding: 40px 15px; - text-align: center; -} -.dotnet { - color: #fff; -} -#rest-vps { - display: none; -} -.value-prop-heading { - margin-top: 0px; -} -.value-props { - margin-top: 40px; - margin-bottom: 40px; -} - -.intro-image { - text-align: center; -} -.intro-image > img { - margin-top: 20px; -} - -/* End of index page styles */ - -/* Getting started page styles */ -.getting-started-intro { - text-align: center; - margin-top: 40px; - margin-bottom: 40px; -} -.getting-started-intro > h2, h4 { - margin-bottom: 30px; -} -.btn-gs { - width: 150px; -} -.btn-gs:hover, .btn-gs:active, .btn-gs:focus, .jquery-active { - color: #fff; - background-color: #682079; - outline: 0 !important; -} - - -.step { - width: 100%; - margin: 50px auto; - padding: 20px 0px; - text-align: center; - font-size: 16px; - border: solid 1px #c0c0c0; - min-height: 300px; - background-color: #fff; - border-radius: 10px; -} -.step-block { - display: block; -} -.step-none { - display: none; -} -.step-number { - position: relative; - top: -40px; - background-color: #32145a; - color: #fff; - font-weight: bold; - font-size: 24px; - z-index: 999; - margin-left: auto; - margin-right: auto; - width: 80px; - padding: 10px; - border: solid 1px #c0c0c0; - border-radius: 10px; -} - -.step > h3 { - margin: 0; - margin-bottom: 30px; - font-size: 30px; -} -.step > p { - margin-top: 10px; - margin-bottom: 20px; - width: 70%; - text-align: center; - margin-left: auto; - margin-right: auto; -} -.code-sample { - white-space: pre; -} - - -/* Terminal backgrounds */ -.terminal { - display: block; - width: 850px; - margin-left: auto; - margin-right: auto; -} -.terminal-titlebar { - background-color: #c0c0c0; - height: 30px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} - -.terminal-body { - background-color: #000; - color: #fff; - font-family: "Consolas", "Monaco", monospace; - font-size: 16px; - font-weight: bold; - padding: 15px; - text-align: left; - height: auto; - overflow: auto; - word-wrap: break-word; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} -.prompt { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - color: #c0c0c0; -} -.windows-prompt:after { - content: 'PS > '; -} -.unix-prompt:after { - content: '~$ '; -} - -@media (max-device-width: 480px) and (orientation: portrait), (max-device-width: 700px) and (orientation: landscape){ - /* Index page overrides */ - .btn-hero-core { - padding: 10px 15px; - margin-left: 0px; - font-size: 16px; - } - .intro-image > img { - display: none; - } - - /* Overview overrides */ - img[src*="10kft_view"] { - width: 100%; - height: 100%; - } - - /* Getting started overrides */ - .btn-gs { - width: auto; - } - - .btn-gs:hover, .btn-gs:active, .btn-gs:focus, .jquery-active { - width: auto; - } - - .step { - width: 90%; - font-size: 14px; - } - .step > h3 { - font-size: 24px; - } - .step-number { - width: 40px; - font-size: 18px; - padding: 5px; - } - .terminal { - width: 95%; - } - .terminal-titlebar { - height: 20px; - } - .terminal-body { - font-size: 12px; - padding: 5px; - } -} diff --git a/docs/template/styles/style.css b/docs/template/styles/style.css deleted file mode 100644 index 2fd826e1..00000000 --- a/docs/template/styles/style.css +++ /dev/null @@ -1,43 +0,0 @@ -body { - font-family: "Open Sans", "Segoe UI", sans-serif; - padding-top: 0px; -} -footer { - z-index: 0; -} -.navbar-brand { - font-size: 18px; - padding: 15px; -} -.toc .level3 { - font-weight: normal; - margin-top: 5px; - margin-left: 10px; -} -a.pull-right { - margin-left: 10px; - padding-top: 5px; -} -article.content > h1 { - word-break: break-word; -} -@media only screen and (max-width: 768px) { - .toc .level3 > li { - display: inline-block; - } - .toc .level3 > li:after { - margin-left: -3px; - margin-right: 5px; - content: ", "; - color: #666666; - } -} -@media (max-width: 260px) { - .toc .level3 > li { - display: block; - } - - .toc .level3 > li:after { - display: none; - } -} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserAction.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserAction.cs new file mode 100644 index 00000000..4ec4b996 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserAction.cs @@ -0,0 +1,13 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal enum BatchParserAction + { + Continue = 0, + Abort = 1 + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserException.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserException.cs new file mode 100644 index 00000000..6b4e6149 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserException.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; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal sealed class BatchParserException : Exception + { + const string ErrorCodeName = "ErrorCode"; + const string BeginName = "Begin"; + const string EndName = "End"; + const string TextName = "Text"; + const string TokenTypeName = "TokenType"; + + ErrorCode errorCode; + PositionStruct begin; + PositionStruct end; + string text; + LexerTokenType tokenType; + + /// + /// Class for a custom exception for the Batch Parser + /// + public BatchParserException(ErrorCode errorCode, Token token, string message) + : base(message) + { + this.errorCode = errorCode; + begin = token.Begin; + end = token.End; + text = token.Text; + tokenType = token.TokenType; + } + + public ErrorCode ErrorCode { get { return errorCode; } } + + public PositionStruct Begin { get { return begin; } } + + public PositionStruct End { get { return end; } } + + public string Text { get { return text; } } + + public LexerTokenType TokenType { get { return tokenType; } } + + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserWrapper.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserWrapper.cs new file mode 100644 index 00000000..5bf02386 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserWrapper.cs @@ -0,0 +1,391 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using Microsoft.SqlTools.ServiceLayer.Utility; +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + + /// + /// Wraps the SMO Batch parser to make it a easily useable component. + /// + public sealed class BatchParserWrapper : IDisposable + { + + private List> startLineColumns; + private List lengths; + private ExecutionEngine executionEngine; + private BatchEventNotificationHandler notificationHandler; + + /// + /// Helper method used to Convert line/column information in a file to offset + /// + private static List ConvertToBatchDefinitionList(string content, + IList> positions, List lengths) + { + + List batchDefinitionList = new List(); + + if (!string.IsNullOrEmpty(content) && (positions.Count > 0)) + { + // Instantiate a string reader for the whole sql content + using (StringReader reader = new StringReader(content)) + { + + // Generate the first batch definition list + int startLine = positions[0].Item1 + 1; + int endLine = startLine; + int lineDifference = 0; + int endColumn; + int lineStartOffset = 0; + int offset = 0; + int startColumn = positions[0].Item2; + int count = positions.Count; + string batchText = content.Substring(offset, lengths[0]); + + // if there's only one batch then the line difference is just 0 + if (count > 1) + { + lineDifference = positions[1].Item1 - positions[0].Item1; + } + + // get endLine, endColumn for the current batch and the lineStartOffset for the next batch + Tuple batchInfo = ReadLines(reader, lineStartOffset, lineDifference, endLine); + endLine = batchInfo.Item1; + endColumn = batchInfo.Item2; + lineStartOffset = batchInfo.Item3; + + offset = lineStartOffset + positions[0].Item2; + + // create a new BatchDefinition and add it to the list + BatchDefinition batchDef = new BatchDefinition( + batchText, + startLine, + endLine, + startColumn + 1, + endColumn + ); + + batchDefinitionList.Add(batchDef); + + // Generate the rest batch definitions + for (int index = 1; index < count - 1; index++) + { + lineDifference = positions[index + 1].Item1 - positions[index].Item1; + batchInfo = ReadLines(reader, lineStartOffset, lineDifference, endLine); + endLine = batchInfo.Item1; + endColumn = batchInfo.Item2; + lineStartOffset = batchInfo.Item3; + batchText = content.Substring(offset, lengths[index]); + offset = lineStartOffset + positions[index].Item2; + startLine = positions[index].Item1; + startColumn = positions[index].Item2; + + // make a new batch definition for each batch + BatchDefinition batch = new BatchDefinition( + batchText, + startLine, + endLine, + startColumn + 1, + endColumn + ); + batchDefinitionList.Add(batch); + } + + // if there is only one batch then that was the last one anyway + if (count > 1) + { + batchText = content.Substring(offset, lengths[count - 1]); + BatchDefinition lastBatchDef = GetLastBatchDefinition(reader, positions[count - 1], batchText); + batchDefinitionList.Add(lastBatchDef); + } + + } + } + return batchDefinitionList; + } + + /// + /// Helper method to get the last batch + /// + private static BatchDefinition GetLastBatchDefinition(StringReader reader, + Tuple position, string batchText) + { + int startLine = position.Item1; + int startColumn = position.Item2; + string prevLine = null; + string line = reader.ReadLine(); + int endLine = startLine; + + // find end line + while (line != null) + { + endLine++; + if (line != "\n") + { + prevLine = line; + } + line = reader.ReadLine(); + } + + // get number of characters in the last line + int endColumn = prevLine.ToCharArray().Length; + + return new BatchDefinition( + batchText, + startLine, + endLine, + startColumn + 1, + endColumn + ); + } + + /// + /// Helper function to get correct lines and columns + /// in a single batch with multiple statements + /// + private static Tuple GetBatchDetails(StringReader reader, int endLine) + { + string prevLine = null; + string line = reader.ReadLine(); + + // find end line + while (line != null) + { + endLine++; + if (line != "\n") + { + prevLine = line; + } + line = reader.ReadLine(); + } + + // get number of characters in the last line + int endColumn = prevLine.ToCharArray().Length; + + //lineOffset doesn't matter because its the last batch + return Tuple.Create(endLine, endColumn, 0); + } + + /// + /// Read number of lines and get the line offset + /// + private static Tuple ReadLines(StringReader reader, int lineStartOffset, int n, int endLine) + { + Validate.IsNotNull(nameof(reader), reader); + int endColumn = 0; + + // if only one batch with multiple lines + if (n == 0) + { + return GetBatchDetails(reader, endLine); + } + + // if there are more than one batch + for (int i = 0; i < n; i++) + { + endColumn = 0; + int ch; + while (true) + { + ch = reader.Read(); + if (ch == -1) // EOF do nothing + { + break; + } + else if (ch == 10 /* for \n */) // End of line increase and break + { + ++lineStartOffset; + ++endLine; + break; + } + else // regular char just increase + { + ++endColumn; + ++lineStartOffset; + } + } + + } + + return Tuple.Create(endLine, endColumn, lineStartOffset); + } + + /// + /// Wrapper API for the Batch Parser that returns a list of + /// BatchDefinitions when given a string to parse + /// + public BatchParserWrapper() + { + executionEngine = new ExecutionEngine(); + + // subscribe to executionEngine BatchParser events + executionEngine.BatchParserExecutionError += OnBatchParserExecutionError; + + executionEngine.BatchParserExecutionFinished += OnBatchParserExecutionFinished; + + // instantiate notificationHandler class + notificationHandler = new BatchEventNotificationHandler(); + } + + /// + /// Takes in a query string and returns a list of BatchDefinitions + /// + public List GetBatches(string sqlScript) + { + startLineColumns = new List>(); + lengths = new List(); + + // execute the script - all communication / integration after here happen via event handlers + executionEngine.ParseScript(sqlScript, notificationHandler); + + // retrieve a list of BatchDefinitions + List batchDefinitionList = ConvertToBatchDefinitionList(sqlScript, startLineColumns, + lengths); + + return batchDefinitionList; + } + + + #region ExecutionEngine Event Handlers + + private void OnBatchParserExecutionError(object sender, BatchParserExecutionErrorEventArgs args) + { + if (args != null) + { + + Logger.Write(LogLevel.Verbose, SR.BatchParserWrapperExecutionError); + throw new Exception(SR.BatchParserWrapperExecutionEngineError); + + } + } + + private void OnBatchParserExecutionFinished(object sender, BatchParserExecutionFinishedEventArgs args) + { + try + { + if (args != null && args.Batch != null) + { + + Tuple position = new Tuple(args.Batch.TextSpan.iStartLine, args.Batch.TextSpan.iStartIndex); + + + // PS168371 + // + // There is a bug in the batch parser where it appends a '\n' to the end of the last + // batch if a GO or statement appears at the end of the string without a \r\n. This is + // throwing off length calculations in other places in the code because the length of + // the string returned is longer than the length of the actual string + // + // To work around this issue we detect this case (a single \n without a preceding \r + // and then adjust the length accordingly + string batchText = args.Batch.Text; + int batchTextLength = batchText.Length; + + if (!batchText.EndsWith(Environment.NewLine, StringComparison.Ordinal) + && batchText.EndsWith("\n", StringComparison.Ordinal)) + { + batchTextLength -= 1; + } + + // Add the script info + startLineColumns.Add(position); + lengths.Add(batchTextLength); + } + } + catch (NotImplementedException) + { + // intentionally swallow + } + catch (Exception e) + { + // adding this for debugging + Logger.Write(LogLevel.Warning, "Exception Caught in BatchParserWrapper.OnBatchParserExecutionFinished(...)" + e.ToString()); + throw; + } + } + + #endregion + + #region Internal BatchEventHandlers class + + /// + /// Internal implementation class to implement IBatchEventHandlers + /// + internal class BatchEventNotificationHandler : IBatchEventsHandler + { + public void OnBatchError(object sender, BatchErrorEventArgs args) + { + if (args != null) + { + + Logger.Write(LogLevel.Normal, SR.BatchParserWrapperExecutionEngineError); + throw new Exception(SR.BatchParserWrapperExecutionEngineError); + + } + } + + public void OnBatchMessage(object sender, BatchMessageEventArgs args) + { +#if DEBUG + if (args != null) + { + Logger.Write(LogLevel.Normal, SR.BatchParserWrapperExecutionEngineBatchMessage); + } +#endif + } + + public void OnBatchResultSetProcessing(object sender, BatchResultSetEventArgs args) + { +#if DEBUG + if (args != null && args.DataReader != null) + { + Logger.Write(LogLevel.Normal, SR.BatchParserWrapperExecutionEngineBatchResultSetProcessing); + } +#endif + } + + public void OnBatchResultSetFinished(object sender, EventArgs args) + { +#if DEBUG + Logger.Write(LogLevel.Normal, SR.BatchParserWrapperExecutionEngineBatchResultSetFinished); +#endif + } + + public void OnBatchCancelling(object sender, EventArgs args) + { + Logger.Write(LogLevel.Normal, SR.BatchParserWrapperExecutionEngineBatchCancelling); + } + } + + #endregion + + #region IDisposable implementation + + public void Dispose() + { + Dispose(true); + } + + private void Dispose(bool disposing) + { + if (disposing) + { + if (executionEngine != null) + { + executionEngine.Dispose(); + executionEngine = null; + startLineColumns = null; + lengths = null; + } + } + } + #endregion + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserWrapperException.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserWrapperException.cs new file mode 100644 index 00000000..541e624e --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserWrapperException.cs @@ -0,0 +1,19 @@ +// +// 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.ServiceLayer.BatchParser +{ + /// This exception is used to report that can come from the Batch Parser inside BatchParserWrapper. + internal sealed class BatchParserWrapperException : Exception + { + /// + /// Get description of the BatchParserWrapperException + /// + public string Description { get; set; } + + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ErrorCode.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ErrorCode.cs new file mode 100644 index 00000000..a85d1478 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ErrorCode.cs @@ -0,0 +1,27 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal enum ErrorCode + { + ErrorCodeBase = 0, + + Success = ErrorCodeBase, + // Lexer error codes + UnsupportedCommand = ErrorCodeBase + 1, + UnrecognizedToken = ErrorCodeBase + 2, + StringNotTerminated = ErrorCodeBase + 3, + CommentNotTerminated = ErrorCodeBase + 4, + + // Parser error codes + InvalidVariableName = ErrorCodeBase + 6, + InvalidNumber = ErrorCodeBase + 7, + TokenExpected = ErrorCodeBase + 8, + Aborted = ErrorCodeBase + 9, + CircularReference = ErrorCodeBase + 10, + VariableNotDefined = ErrorCodeBase + 11, + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/Batch.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/Batch.cs new file mode 100644 index 00000000..f1083314 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/Batch.cs @@ -0,0 +1,873 @@ +// +// 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.Data; +using System.Data.SqlClient; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection; +using Microsoft.SqlTools.ServiceLayer.Utility; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Single batch of SQL command + /// + internal class Batch + { + #region Private methods + + /// + /// Helper method to format the provided SqlError + /// + /// + /// + private string FormatSqlErrorMessage(SqlError error) + { + string detailedMessage = string.Empty; + + if (error.Class > 10) + { + if (string.IsNullOrEmpty(error.Procedure)) + { + detailedMessage = string.Format(CultureInfo.CurrentCulture, SR.EE_BatchSqlMessageNoProcedureInfo, + error.Number, + error.Class, + error.State, + error.LineNumber); + } + else + { + detailedMessage = string.Format(CultureInfo.CurrentCulture, SR.EE_BatchSqlMessageWithProcedureInfo, + error.Number, + error.Class, + error.State, + error.Procedure, + error.LineNumber); + } + } + else if (error.Class > 0 && error.Number > 0) + { + detailedMessage = string.Format(CultureInfo.CurrentCulture, SR.EE_BatchSqlMessageNoLineInfo, + error.Number, + error.Class, + error.State); + } + + if (!string.IsNullOrEmpty(detailedMessage) && !isSuppressProviderMessageHeaders) + { + detailedMessage = string.Format(CultureInfo.CurrentCulture, "{0}: {1}", error.Source, detailedMessage); + } + + return detailedMessage; + } + + /// + /// Handles a Sql exception + /// + /// + /// + private ScriptExecutionResult HandleSqlException(SqlException ex) + { + ScriptExecutionResult result; + + lock (this) + { + if (state == BatchState.Cancelling) + { + result = ScriptExecutionResult.Cancel; + } + else + { + result = ScriptExecutionResult.Failure; + } + } + + if (result != ScriptExecutionResult.Cancel) + { + HandleSqlMessages(ex.Errors); + } + + return result; + } + + /// + /// Called when an error message came from SqlClient + /// + /// + /// + /// + /// + private void RaiseBatchError(string message, SqlError error, TextSpan textSpan) + { + BatchErrorEventArgs args = new BatchErrorEventArgs(message, error, textSpan, null); + RaiseBatchError(args); + } + + /// + /// Called when an error message came from SqlClient + /// + /// + private void RaiseBatchError(BatchErrorEventArgs e) + { + EventHandler cache = BatchError; + if (cache != null) + { + cache(this, e); + } + } + + /// + /// Called when a message came from SqlClient + /// + /// + /// Additionally, it's being used to notify the user that the script execution + /// has been finished. + /// + /// + /// + private void RaiseBatchMessage(string detailedMessage, string message, SqlError error) + { + EventHandler cache = BatchMessage; + if (cache != null) + { + BatchMessageEventArgs args = new BatchMessageEventArgs(detailedMessage, message, error); + cache(this, args); + } + } + + /// + /// Called when a new result set has to be processed + /// + /// + private void RaiseBatchResultSetProcessing(IDataReader dataReader, ShowPlanType expectedShowPlan) + { + EventHandler cache = BatchResultSetProcessing; + if (cache != null) + { + BatchResultSetEventArgs args = new BatchResultSetEventArgs(dataReader, expectedShowPlan); + BatchResultSetProcessing(this, args); + } + } + + /// + /// Called when the result set has been processed + /// + private void RaiseBatchResultSetFinished() + { + EventHandler cache = BatchResultSetFinished; + if (cache != null) + { + cache(this, EventArgs.Empty); + } + } + + /// + /// Called when the batch is being cancelled with an active result set + /// + private void RaiseCancelling() + { + EventHandler cache = BatchCancelling; + if (cache != null) + { + cache(this, EventArgs.Empty); + } + } + #endregion + + #region Private enums + + private enum BatchState + { + Initial, + Executing, + Executed, + ProcessingResults, + Cancelling, + } + #endregion + + #region Private fields + + // correspond to public properties + private bool isSuppressProviderMessageHeaders; + private bool isResultExpected = false; + private string sqlText = string.Empty; + private int execTimeout = 30; + private int scriptTrackingId = 0; + private bool isScriptExecutionTracked = false; + private const int ChangeDatabase = 0x1645; + + //command that will be used for execution + private IDbCommand command = null; + + //current object state + private BatchState state = BatchState.Initial; + + //script text to be executed + private TextSpan textSpan; + + //index of the batch in collection of batches + private int index = 0; + + private long totalAffectedRows = 0; + + private bool hasErrors; + + // Expected showplan if any + private ShowPlanType expectedShowPlan; + + #endregion + + #region Constructors + + /// + /// Default constructor + /// + public Batch() + { + // nothing + } + + /// + /// Creates and initializes a batch object + /// + /// Whether it is one of "set [something] on/off" type of command, + /// that doesn't return any results from the server + /// + /// Text of the batch + /// Timeout for the batch execution. 0 means no limit + public Batch(string sqlText, bool isResultExpected, int execTimeout) + { + this.isResultExpected = isResultExpected; + this.sqlText = sqlText; + this.execTimeout = execTimeout; + } + + #endregion + + #region Public properties + + /// + /// Is the Batch's text valid? + /// + public bool HasValidText + { + get + { + return !string.IsNullOrEmpty(sqlText); + } + } + + /// + /// SQL text that to be executed in the Batch + /// + public string Text + { + get + { + return sqlText; + } + + set + { + sqlText = value; + } + } + + + /// + /// Determines whether batch execution returns any results + /// + public bool IsResultsExpected + { + get + { + return isResultExpected; + } + + set + { + isResultExpected = value; + } + } + + /// + /// Determines the execution timeout for the batch + /// + public int ExecutionTimeout + { + get + { + return execTimeout; + } + + set + { + execTimeout = value; + } + } + + /// + /// Determines the textspan to wich the batch belongs to + /// + public TextSpan TextSpan + { + get + { + return textSpan; + } + set + { + textSpan = value; + } + } + + /// + /// Determines the batch index in the collection of batches being executed + /// + public int BatchIndex + { + get + { + return index; + } + + set + { + index = value; + } + } + + + /// + /// Returns how many rows were affected. It should be the value that can be shown + /// in the UI. + /// + /// + /// It can be used only after the execution of the batch is finished + /// + public long RowsAffected + { + get + { + return totalAffectedRows; + } + } + + /// + /// Determines if the error.Source should be used when messages are written + /// + public bool IsSuppressProviderMessageHeaders + { + get + { + return isSuppressProviderMessageHeaders; + } + set + { + isSuppressProviderMessageHeaders = value; + } + } + + /// + /// Gets or sets the id of the script we are tracking + /// + public int ScriptTrackingId + { + get + { + return scriptTrackingId; + } + set + { + scriptTrackingId = value; + } + } + + #endregion + + #region Public events + + /// + /// fired when there is an error message from the server + /// + public event EventHandler BatchError = null; + + /// + /// fired when there is a message from the server + /// + public event EventHandler BatchMessage = null; + + /// + /// fired when there is a new result set available. It is guarnteed + /// to be fired from the same thread that called Execute method + /// + public event EventHandler BatchResultSetProcessing = null; + + /// + /// fired when the batch recieved cancel request BEFORE it + /// initiates cancel operation. Note that it is fired from a + /// different thread then the one used to kick off execution + /// + public event EventHandler BatchCancelling = null; + + /// + /// fired when we've done absolutely all actions for the current result set + /// + public event EventHandler BatchResultSetFinished = null; + #endregion + + #region Public methods + + /// + /// Resets the object to its initial state + /// + public void Reset() + { + lock (this) + { + state = BatchState.Initial; + command = null; + textSpan = new TextSpan(); + totalAffectedRows = 0; + hasErrors = false; + expectedShowPlan = ShowPlanType.None; + isSuppressProviderMessageHeaders = false; + scriptTrackingId = 0; + isScriptExecutionTracked = false; + } + } + + /// + /// Executes the batch + /// + /// Connection to use + /// ShowPlan type to be used + /// result of execution + /// + /// It does not return until execution is finished + /// We may have received a Cancel request by the time this function is called + /// + public ScriptExecutionResult Execute(SqlConnection connection, ShowPlanType expectedShowPlan) + { + // FUTURE CLEANUP: Remove in favor of general signature (IDbConnection) - #920978 + return Execute((IDbConnection)connection, expectedShowPlan); + } + + /// + /// Executes the batch + /// + /// Connection to use + /// ShowPlan type to be used + /// result of execution + /// + /// It does not return until execution is finished + /// We may have received a Cancel request by the time this function is called + /// + public ScriptExecutionResult Execute(IDbConnection connection, ShowPlanType expectedShowPlan) + { + + Validate.IsNotNull(nameof(connection), connection); + + //makes sure that the batch is not in use + lock (this) + { + Debug.Assert(command == null, "SQLCommand is NOT null"); + if (command != null) + { + command = null; + } + } + + this.expectedShowPlan = expectedShowPlan; + + return DoBatchExecutionImpl(connection, sqlText); + } + + /// + /// Cancels the batch + /// + /// + /// When batch is actually cancelled, Execute() will return with the appropiate status + /// + public void Cancel() + { + lock (this) + { + if (state != BatchState.Cancelling) + { + state = BatchState.Cancelling; + + RaiseCancelling(); + + if (command != null) + { + try + { + command.Cancel(); + + Debug.WriteLine("Batch.Cancel: command.Cancel completed"); + } + catch (SqlException) + { + // eat it + } + catch (RetryLimitExceededException) + { + // eat it + } + } + } + } + } + + #endregion + + #region Protected methods + + /// + /// Fires an error message event + /// + /// Exception caught + /// + /// Non-SQL exception + /// + protected void HandleExceptionMessage(Exception ex) + { + BatchErrorEventArgs args = new BatchErrorEventArgs(string.Format(CultureInfo.CurrentCulture, SR.EE_BatchError_Exception, ex.Message), ex); + RaiseBatchError(args); + } + + /// + /// Fires a message event + /// + /// SqlClient errors collection + /// + /// Sql specific messages. + /// + protected void HandleSqlMessages(SqlErrorCollection errors) + { + foreach (SqlError error in errors) + { + if (error.Number == ChangeDatabase) + { + continue; + } + + string detailedMessage = FormatSqlErrorMessage(error); + + if (error.Class > 10) + { + // expose this event as error + Debug.Assert(detailedMessage.Length != 0); + RaiseBatchError(detailedMessage, error, textSpan); + + //at least one error message has been used + hasErrors = true; + } + else + { + RaiseBatchMessage(detailedMessage, error.Message, error); + } + } + } + + /// + /// method that will be passed as delegate to SqlConnection.InfoMessage + /// + protected void OnSqlInfoMessageCallback(object sender, SqlInfoMessageEventArgs e) + { + HandleSqlMessages(e.Errors); + } + + /// + /// Delegete for SqlCommand.RecordsAffected + /// + /// + /// + /// + /// This is exposed as a regular message + /// + protected void OnStatementExecutionFinished(object sender, StatementCompletedEventArgs e) + { + string message = string.Format(CultureInfo.CurrentCulture, SR.EE_BatchExecutionInfo_RowsAffected, + e.RecordCount.ToString(System.Globalization.CultureInfo.InvariantCulture)); + RaiseBatchMessage(message, message, null); + } + + /// + /// Called on a new ResultSet on the data reader + /// + /// True if result set consumed, false on a Cancel request + /// + /// + /// The GridStorageResultSet created is owned by the batch consumer. It's only created here. + /// Additionally, when BatchResultSet event handler is called, it won't return until + /// all data is prcessed or the data being processed is terminated (i.e. cancel or error) + /// + protected ScriptExecutionResult ProcessResultSet(IDataReader dataReader) + { + if (dataReader == null) + { + throw new ArgumentNullException(); + } + + Debug.WriteLine("ProcessResultSet: result set has been created"); + + //initialize result variable that will be set by batch consumer + ScriptExecutionResult scriptExecutionResult = ScriptExecutionResult.Success; + + RaiseBatchResultSetProcessing(dataReader, expectedShowPlan); + + if (state != BatchState.Cancelling) + { + return scriptExecutionResult; + } + else + { + return ScriptExecutionResult.Cancel; + } + } + + // FUTURE CLEANUP: Remove in favor of general signature (IDbConnection) - #920978 + protected ScriptExecutionResult DoBatchExecution(SqlConnection connection, string script) + { + return DoBatchExecutionImpl(connection, script); + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2100:Review SQL queries for security vulnerabilities"), SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] + [SuppressMessage("Microsoft.Usage", "CA2219:DoNotRaiseExceptionsInExceptionClauses")] + private ScriptExecutionResult DoBatchExecutionImpl(IDbConnection connection, string script) + { + Validate.IsNotNull(nameof(connection), connection); + + lock (this) + { + if (state == BatchState.Cancelling) + { + state = BatchState.Initial; + return ScriptExecutionResult.Cancel; + } + } + + ScriptExecutionResult result = ScriptExecutionResult.Success; + + // SqlClient event handlers setup + SqlInfoMessageEventHandler messageHandler = new SqlInfoMessageEventHandler(OnSqlInfoMessageCallback); + StatementCompletedEventHandler statementCompletedHandler = null; + + DbConnectionWrapper connectionWrapper = new DbConnectionWrapper(connection); + connectionWrapper.InfoMessage += messageHandler; + + IDbCommand command = connection.CreateCommand(); + command.CommandText = script; + command.CommandTimeout = execTimeout; + + DbCommandWrapper commandWrapper = null; + if (isScriptExecutionTracked && DbCommandWrapper.IsSupportedCommand(command)) + { + statementCompletedHandler = new StatementCompletedEventHandler(OnStatementExecutionFinished); + commandWrapper = new DbCommandWrapper(command); + commandWrapper.StatementCompleted += statementCompletedHandler; + } + + lock (this) + { + state = BatchState.Executing; + this.command = command; + command = null; + } + + try + { + result = this.ExecuteCommand(); + } + catch (OutOfMemoryException) + { + throw; + } + catch (SqlException sqlEx) + { + result = HandleSqlException(sqlEx); + } + catch (Exception ex) + { + result = ScriptExecutionResult.Failure; + HandleExceptionMessage(ex); + } + finally + { + + if (messageHandler == null) + { + Logger.Write(LogLevel.Error, "Expected handler to be declared"); + } + + if (null != connectionWrapper) + { + connectionWrapper.InfoMessage -= messageHandler; + } + + if (commandWrapper != null) + { + + if (statementCompletedHandler == null) + { + Logger.Write(LogLevel.Error, "Expect handler to be declared if we have a command wrapper"); + } + commandWrapper.StatementCompleted -= statementCompletedHandler; + } + + lock (this) + { + state = BatchState.Initial; + if (command != null) + { + command.Dispose(); + command = null; + } + } + } + + return result; + } + + private ScriptExecutionResult ExecuteCommand() + { + if (command == null) + { + throw new ArgumentNullException("command"); + } + + return this.ExecuteUnTrackedCommand(); + + } + + private ScriptExecutionResult ExecuteUnTrackedCommand() + { + IDataReader reader = null; + + if (!isResultExpected) + { + command.ExecuteNonQuery(); + } + else + { + reader = command.ExecuteReader(CommandBehavior.SequentialAccess); + } + + return this.CheckStateAndRead(reader); + } + + private ScriptExecutionResult CheckStateAndRead(IDataReader reader = null) + { + ScriptExecutionResult result = ScriptExecutionResult.Success; + + if (!isResultExpected) + { + lock (this) + { + if (state == BatchState.Cancelling) + { + result = ScriptExecutionResult.Cancel; + } + else + { + result = ScriptExecutionResult.Success; + state = BatchState.Executed; + } + } + } + else + { + lock (this) + { + if (state == BatchState.Cancelling) + { + result = ScriptExecutionResult.Cancel; + } + else + { + state = BatchState.ProcessingResults; + } + } + + if (result != ScriptExecutionResult.Cancel) + { + ScriptExecutionResult batchExecutionResult = ScriptExecutionResult.Success; + + if (reader != null) + { + bool hasNextResult = false; + do + { + // if there were no results coming from the server, then the FieldCount is 0 + if (reader.FieldCount <= 0) + { + hasNextResult = reader.NextResult(); + continue; + } + + batchExecutionResult = ProcessResultSet(reader); + + if (batchExecutionResult != ScriptExecutionResult.Success) + { + result = batchExecutionResult; + break; + } + + RaiseBatchResultSetFinished(); + + hasNextResult = reader.NextResult(); + + } while (hasNextResult); + } + + if (hasErrors) + { + Debug.WriteLine("DoBatchExecution: successfull processed result set, but there were errors shown to the user"); + result = ScriptExecutionResult.Failure; + } + + if (result != ScriptExecutionResult.Cancel) + { + lock (this) + { + state = BatchState.Executed; + } + } + } + } + + if (reader != null) + { + try + { + // reader.Close() doesn't actually close the reader + // so explicitly dispose the reader + reader.Dispose(); + reader = null; + } + catch (OutOfMemoryException) + { + throw; + } + catch (SqlException) + { + // nothing + } + } + + return result; + } + + + #endregion + + } +} \ No newline at end of file diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchDefinition.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchDefinition.cs new file mode 100644 index 00000000..954a8bf9 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchDefinition.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Class to get text from the BatchParser and convert them into batches + /// + public class BatchDefinition + { + + /// + /// Constructor method for a BatchDefinition + /// + public BatchDefinition(string batchText, int startLine, int endLine, int startColumn, int endColumn) + { + BatchText = batchText; + StartLine = startLine; + EndLine = endLine; + StartColumn = startColumn; + EndColumn = endColumn; + } + + /// + /// Get starting line of the BatchDefinition + /// + public int StartLine + { + get; private set; + } + + /// + /// Get ending line of the BatchDefinition + /// + public int EndLine + { + get; private set; + } + + /// + /// Get starting column of the BatchDefinition + /// + public int StartColumn + { + get; private set; + } + + /// + /// Get ending column of the BatchDefinition + /// + public int EndColumn + { + get; private set; + } + + /// + /// Get batch text assocaited with the BatchDefinition + /// + public string BatchText + { + get; private set; + } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchErrorEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchErrorEventArgs.cs new file mode 100644 index 00000000..d423fb16 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchErrorEventArgs.cs @@ -0,0 +1,141 @@ +// +// 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.Data.SqlClient; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Error totalAffectedRows for a Batch + /// + internal class BatchErrorEventArgs : EventArgs + { + #region Private Fields + private string message = string.Empty; + private string description = string.Empty; + private int line = -1; + private TextSpan textSpan; + private Exception exception; + private SqlError error; + #endregion + + #region Constructors / Destructor + + /// + /// Default constructor + /// + private BatchErrorEventArgs() + { + } + + /// + /// Constructor with message and no description + /// + internal BatchErrorEventArgs(string message) + : this(message, null) + { + } + + /// + /// Constructor with exception and no description + /// + internal BatchErrorEventArgs(string message, Exception ex) + : this(message, string.Empty, ex) + { + } + + /// + /// Constructor with message and description + /// + internal BatchErrorEventArgs(string message, string description, Exception ex) + : this(message, description, -1, new TextSpan(), ex) + { + } + + internal BatchErrorEventArgs(string message, SqlError error, TextSpan textSpan, Exception ex) + { + string desc = error != null ? error.Message : null; + if (error.Number == 7202) + { + desc += " " + Environment.NewLine + SR.TroubleshootingAssistanceMessage; + } + + int lineNumber = error != null ? error.LineNumber : -1; + Init(message, desc, lineNumber, textSpan, ex); + this.error = error; + } + + /// + /// Constructor with message, description, textspan and line number + /// + internal BatchErrorEventArgs(string message, string description, int line, TextSpan textSpan, Exception ex) + { + Init(message, description, line, textSpan, ex); + } + + private void Init(string message, string description, int line, TextSpan textSpan, Exception ex) + { + this.message = message; + this.description = description; + this.line = line; + this.textSpan = textSpan; + exception = ex; + } + + #endregion + + #region Public properties + + public string Message + { + get + { + return message; + } + } + + public string Description + { + get + { + return description; + } + } + + public int Line + { + get + { + return line; + } + } + + public TextSpan TextSpan + { + get + { + return textSpan; + } + } + + public Exception Exception + { + get + { + return exception; + } + } + + public SqlError Error + { + get { return error; } + } + + + #endregion + + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchMessageEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchMessageEventArgs.cs new file mode 100644 index 00000000..3ec42f35 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchMessageEventArgs.cs @@ -0,0 +1,58 @@ +// +// 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.Data.SqlClient; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Event args for notification about non-error message + /// + internal class BatchMessageEventArgs : EventArgs + { + private readonly string message = string.Empty; + private readonly string detailedMessage = string.Empty; + private readonly SqlError error; + + private BatchMessageEventArgs() + { + } + + internal BatchMessageEventArgs(string msg) + : this(string.Empty, msg) + { + } + + internal BatchMessageEventArgs(string detailedMsg, string msg) : this(detailedMsg, msg, null) + { + } + internal BatchMessageEventArgs(string detailedMsg, string msg, SqlError error) + { + message = msg; + detailedMessage = detailedMsg; + this.error = error; + } + + public string Message + { + get + { + return message; + } + } + + public string DetailedMessage + { + get + { + return detailedMessage; + } + } + + public SqlError Error { get { return error; } } + + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParser.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParser.cs new file mode 100644 index 00000000..62fd22e1 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParser.cs @@ -0,0 +1,161 @@ +// +// 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.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Class that parses queries into batches + /// + internal class BatchParser : + ICommandHandler, + IVariableResolver + { + #region Private fields + protected ScriptMessageDelegate scriptMessageDelegate; + protected ScriptErrorDelegate scriptErrorDelegate; + protected ExecuteDelegate executeDelegate; + protected HaltParserDelegate haltParserDelegate; + private int startingLine = 0; + protected bool variableSubstitutionDisabled = false; + + #endregion + + #region Public delegates + public delegate void HaltParserDelegate(); + public delegate void ScriptMessageDelegate(string message); + public delegate void ScriptErrorDelegate(string message, ScriptMessageType messageType); + public delegate bool ExecuteDelegate(string batchScript, int num, int lineNumber); + #endregion + + #region Constructors / Destructor + public BatchParser() + { + } + #endregion + + #region Public properties + public ScriptMessageDelegate Message + { + get { return scriptMessageDelegate; } + set { scriptMessageDelegate = value; } + } + + public ScriptErrorDelegate ErrorMessage + { + get { return scriptErrorDelegate; } + set { scriptErrorDelegate = value; } + } + + public ExecuteDelegate Execute + { + get { return executeDelegate; } + set { executeDelegate = value; } + } + + public HaltParserDelegate HaltParser + { + get { return haltParserDelegate; } + set { haltParserDelegate = value; } + } + + public int StartingLine + { + get { return startingLine; } + set { startingLine = value; } + } + + #endregion + + #region ICommandHandler Members + + /// + /// Take approptiate action on the parsed batches + /// + public BatchParserAction Go(TextBlock batch, int repeatCount) + { + string str; + LineInfo lineInfo; + + batch.GetText(!variableSubstitutionDisabled, out str, out lineInfo); + + bool executeResult = false; + if (executeDelegate != null) + { + executeResult = executeDelegate(str, repeatCount, lineInfo.GetStreamPositionForOffset(0).Line + startingLine - 1); + } + return executeResult ? BatchParserAction.Continue : BatchParserAction.Abort; + } + + #endregion + + #region Protected methods + /// + /// Called when the script parsing has errors/warnings + /// + /// + /// + protected void RaiseScriptError(string message, ScriptMessageType messageType) + { + if (scriptErrorDelegate != null) + { + scriptErrorDelegate(message, messageType); + } + } + + /// + /// Called on parsing info message + /// + /// + /// + protected void RaiseScriptMessage(string message) + { + if (scriptMessageDelegate != null) + { + scriptMessageDelegate(message); + } + } + + /// + /// Called on parsing info message + /// + /// + /// + protected void RaiseHaltParser() + { + if (haltParserDelegate != null) + { + haltParserDelegate(); + } + } + #endregion + + public virtual BatchParserAction OnError(Token token, OnErrorAction action) + { + throw new NotImplementedException("The method or operation is not implemented."); + } + + public virtual BatchParserAction Include(TextBlock filename, out System.IO.TextReader stream, out string newFilename) + { + throw new NotImplementedException("The method or operation is not implemented."); + } + + public virtual string GetVariable(PositionStruct pos, string name) + { + throw new NotImplementedException("The method or operation is not implemented."); + } + + public virtual void SetVariable(PositionStruct pos, string name, string value) + { + throw new NotImplementedException("The method or operation is not implemented."); + } + + internal void DisableVariableSubstitution() + { + variableSubstitutionDisabled = true; + } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionErrorEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionErrorEventArgs.cs new file mode 100644 index 00000000..05961304 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionErrorEventArgs.cs @@ -0,0 +1,33 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Class associated with batch parser execution errors + /// + internal class BatchParserExecutionErrorEventArgs : BatchErrorEventArgs + { + private readonly ScriptMessageType messageType; + + /// + /// Constructor method for BatchParserExecutionErrorEventArgs class + /// + public BatchParserExecutionErrorEventArgs(string errorLine, string message, ScriptMessageType messageType) + : base(errorLine, message, null) + { + this.messageType = messageType; + } + + public ScriptMessageType MessageType + { + get + { + return messageType; + } + } + + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionFinishedEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionFinishedEventArgs.cs new file mode 100644 index 00000000..08f0b2fa --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionFinishedEventArgs.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; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Class associated with batch parser execution finished event + /// + internal class BatchParserExecutionFinishedEventArgs : EventArgs + { + + private readonly Batch batch = null; + private readonly ScriptExecutionResult result; + + private BatchParserExecutionFinishedEventArgs() + { + } + + /// + /// Constructor method for the class + /// + public BatchParserExecutionFinishedEventArgs(ScriptExecutionResult batchResult, Batch batch) + { + this.batch = batch; + result = batchResult; + } + + public Batch Batch + { + get + { + return batch; + } + } + + public ScriptExecutionResult ExecutionResult + { + get + { + return result; + } + } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionStartEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionStartEventArgs.cs new file mode 100644 index 00000000..d3d90fc9 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserExecutionStartEventArgs.cs @@ -0,0 +1,50 @@ +// +// 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.ServiceLayer.BatchParser.ExecutionEngineCode +{ + + /// + /// Class associated with batch parser execution start event + /// + internal class BatchParserExecutionStartEventArgs : EventArgs + { + + private readonly Batch batch = null; + private readonly TextSpan textSpan; + + private BatchParserExecutionStartEventArgs() + { + } + + /// + /// Contructor method for the class + /// + public BatchParserExecutionStartEventArgs(TextSpan textSpan, Batch batch) + { + this.batch = batch; + this.textSpan = textSpan; + } + + public Batch Batch + { + get + { + return batch; + } + } + + public TextSpan TextSpan + { + get + { + return textSpan; + } + } + + } +} \ No newline at end of file diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs new file mode 100644 index 00000000..721beba9 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs @@ -0,0 +1,133 @@ +// +// 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.Data.SqlClient; +using System.Globalization; +using System.IO; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Class for handling SQL CMD by Batch Parser + /// + internal class BatchParserSqlCmd : BatchParser + { + /// + /// The internal variables that can be used in SqlCommand substitution. + /// These variables take precedence over environment variables. + /// + private Dictionary internalVariables = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + private ConnectionChangedDelegate connectionChangedDelegate; + private ErrorActionChangedDelegate errorActionChangedDelegate; + + public delegate void ConnectionChangedDelegate(SqlConnectionStringBuilder connectionstringBuilder); + public delegate void ErrorActionChangedDelegate(OnErrorAction ea); + + /// + /// Constructor taking a Parser instance + /// + /// + public BatchParserSqlCmd() + : base() + { + // nothing + } + + internal ConnectionChangedDelegate ConnectionChanged + { + get { return connectionChangedDelegate; } + set { connectionChangedDelegate = value; } + } + + internal ErrorActionChangedDelegate ErrorActionChanged + { + get { return errorActionChangedDelegate; } + set { errorActionChangedDelegate = value; } + } + + /// + /// Looks for any environment variable or internal variable. + /// + public override string GetVariable(PositionStruct pos, string name) + { + if (variableSubstitutionDisabled) + { + return null; + } + + string value; + + // Internally defined variables have higher precedence over environment variables. + if (!internalVariables.TryGetValue(name, out value)) + { + value = Environment.GetEnvironmentVariables()[name] as string; + } + if (value == null) + { + RaiseScriptError(string.Format(CultureInfo.CurrentCulture, SR.EE_ExecutionError_VariableNotFound, name), ScriptMessageType.FatalError); + RaiseHaltParser(); + // TODO: Halt the parser, should get/set variable have ParserAction.Abort/Continue (like original?) + } + + return value; + } + + /// + /// Set environment or internal variable + /// + public override void SetVariable(PositionStruct pos, string name, string value) + { + if (variableSubstitutionDisabled) + { + return; + } + + if (value == null) + { + if (internalVariables.ContainsKey(name)) + { + internalVariables.Remove(name); + } + } + else + { + internalVariables[name] = value; + } + } + + public Dictionary InternalVariables + { + get { return internalVariables; } + set { internalVariables = value; } + } + + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "ppIBatchSource")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "fileName")] + public override BatchParserAction Include(TextBlock filename, out TextReader stream, out string newFilename) + { + stream = null; + newFilename = null; + + RaiseScriptError(string.Format(CultureInfo.CurrentCulture, SR.EE_ExecutionError_CommandNotSupported, "Include"), ScriptMessageType.Error); + return BatchParserAction.Abort; + } + + /// + /// Method to deal with errors + /// + public override BatchParserAction OnError(Token token, OnErrorAction ea) + { + if (errorActionChangedDelegate != null) + { + errorActionChangedDelegate(ea); + } + return BatchParserAction.Continue; + } + + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchResultSetEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchResultSetEventArgs.cs new file mode 100644 index 00000000..0b80cf0d --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/BatchResultSetEventArgs.cs @@ -0,0 +1,52 @@ +// +// 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.Data; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Class associated with setting batch results + /// + internal class BatchResultSetEventArgs : EventArgs + { + + private readonly IDataReader dataReader = null; + private readonly ShowPlanType expectedShowPlan = ShowPlanType.None; + + /// + /// Default constructor + /// + /// + internal BatchResultSetEventArgs(IDataReader dataReader, ShowPlanType expectedShowPlan) + { + this.dataReader = dataReader; + this.expectedShowPlan = expectedShowPlan; + } + + /// + /// Data reader associated with the result set + /// + public IDataReader DataReader + { + get + { + return dataReader; + } + } + + /// + /// Show Plan to be expected if any during the execution + /// + public ShowPlanType ExpectedShowPlan + { + get + { + return expectedShowPlan; + } + } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionEngine.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionEngine.cs new file mode 100644 index 00000000..57f4249e --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionEngine.cs @@ -0,0 +1,1137 @@ +// +// 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.Data; +using System.Data.SqlClient; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Text; +using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection; +using Microsoft.SqlTools.ServiceLayer.Utility; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + /// + /// Execution engine class which executed the parsed batches + /// + internal class ExecutionEngine : IDisposable + { + + #region Private fields + private OnErrorAction errorAction = OnErrorAction.Ignore; + private int numBatchExecutionTimes = 1; + private IDbConnection connection = null; + private bool isSqlCmdConnection; + + private Parser commandParser = null; + private int executionTimeout; + private int startingLine; + private ExecutionState executionState = ExecutionState.Initial; + private string script; + private ScriptExecutionResult result = ScriptExecutionResult.Failure; + private bool isLocalParse; + private ExecutionEngineConditions conditions = null; + private IList preConditionBatches = new List(); + private IList postConditionBatches = new List(); + private IBatchEventsHandler batchEventHandlers = null; + private Batch currentBatch = new Batch(); + private ShowPlanType expectedShowPlan; + private int currentBatchIndex = -1; + private int scriptTrackingId = 1; + private object stateSyncLock = new object(); + + /// + /// The internal variables that can be used in SqlCommand substitution. + /// These variables take precedence over environment variables. + /// + private Dictionary internalVariables = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + #endregion + + #region Private members + + /// + /// Batch to be executed + /// + /// Batch to execute + /// + [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] + private ScriptExecutionResult DoBatchExecution(Batch batch) + { + Validate.IsNotNull(nameof(batch), batch); + + ScriptExecutionResult result = ScriptExecutionResult.Success; + + // TODO, fawinter: Do I need to keep this batch? + if (batch.HasValidText) + { + try + { + // Parsing mode we execute only once + if (conditions.IsParseOnly) + { + numBatchExecutionTimes = 1; + } + + int timesLoop = numBatchExecutionTimes; + if (numBatchExecutionTimes > 1) + { + RaiseBatchMessage(String.Format(CultureInfo.CurrentCulture, SR.EE_ExecutionInfo_InitilizingLoop, numBatchExecutionTimes)); + } + + while (timesLoop > 0 && result != ScriptExecutionResult.Cancel && result != ScriptExecutionResult.Halted) + { + result = batch.Execute(connection, expectedShowPlan); + + Debug.Assert(connection != null); + if (connection == null || connection.State != ConnectionState.Open) + { + result = ScriptExecutionResult.Halted; + } + + if (result == ScriptExecutionResult.Failure) + { + if (errorAction == OnErrorAction.Ignore) + { + if (numBatchExecutionTimes > 1) + { + RaiseBatchMessage(SR.EE_BatchExecutionError_Ignoring); + } + } + else + { + RaiseBatchMessage(SR.EE_BatchExecutionError_Halting); + result = ScriptExecutionResult.Halted; + } + } + + timesLoop--; + } + + + if (result == ScriptExecutionResult.Cancel) + { + RaiseBatchMessage(String.Format(CultureInfo.CurrentCulture, SR.EE_ExecutionInfo_QueryCancelledbyUser)); + } + else + { + if (numBatchExecutionTimes > 1) + { + RaiseBatchMessage(String.Format(CultureInfo.CurrentCulture, SR.EE_ExecutionInfo_FinalizingLoop, numBatchExecutionTimes)); + } + } + } + catch (OutOfMemoryException) + { + throw; + } + catch (Exception ex) + { + // if anything goes wrong it will shutdown VS + Logger.Write(LogLevel.Error, "Exception Caught in ExecutionEngine.DoBatchExecution(Batch) :" + ex.ToString()); + result = ScriptExecutionResult.Failure; + } + } + else + { + // TODO, fawinter: Success will be returned on an Empty text batch + } + + return result; + } + + /// + /// Resets the script's related fields + /// + /// + /// Once the execution thread is nulled, all handles will be closed and GC will collect it + /// + private void ResetScript() + { + lock (stateSyncLock) + { + executionState = ExecutionState.Initial; + } + + ConfigurePrePostConditionBatches(preConditionBatches); + ConfigurePrePostConditionBatches(postConditionBatches); + + currentBatchIndex = -1; + conditions = null; + batchEventHandlers = null; + } + + /// + /// Configures the script for execution + /// + private void ConfigureBatchParser() + { + BatchParser batchParser; + bool sqlCmdMode; + + if (conditions != null && conditions.IsSqlCmd) + { + BatchParserSqlCmd batchParserSqlCmd = new BatchParserSqlCmd(); + batchParserSqlCmd.ConnectionChanged = new BatchParserSqlCmd.ConnectionChangedDelegate(OnConnectionChanged); + batchParserSqlCmd.ErrorActionChanged = new BatchParserSqlCmd.ErrorActionChangedDelegate(OnErrorActionChanged); + batchParserSqlCmd.InternalVariables = internalVariables; + sqlCmdMode = true; + batchParser = batchParserSqlCmd; + } + else + { + batchParser = new BatchParser(); + sqlCmdMode = false; + } + + commandParser = new Parser(batchParser, batchParser, new StringReader(script), "[script]"); + commandParser.SetRecognizeSqlCmdSyntax(sqlCmdMode); + commandParser.SetBatchDelimiter(BatchSeparator); + commandParser.ThrowOnUnresolvedVariable = true; + + batchParser.Execute = new BatchParser.ExecuteDelegate(ExecuteBatchInternal); + batchParser.ErrorMessage = new BatchParser.ScriptErrorDelegate(RaiseScriptError); + batchParser.Message = new BatchParser.ScriptMessageDelegate(RaiseBatchMessage); + batchParser.HaltParser = new BatchParser.HaltParserDelegate(OnHaltParser); + batchParser.StartingLine = startingLine; + + if (isLocalParse) + { + batchParser.DisableVariableSubstitution(); + } + } + + /// + /// Configures the batch before execution + /// + private void ConfigureBatch() + { + numBatchExecutionTimes = 1; + currentBatch.IsResultsExpected = true; + } + + /// + /// Called when batch parser found an error + /// + /// + private void RaiseBatchParserExecutionError(string errorLine, string message, ScriptMessageType messageType) + { + EventHandler cache = BatchParserExecutionError; + if (cache != null) + { + BatchParserExecutionErrorEventArgs args = new BatchParserExecutionErrorEventArgs(errorLine, message, messageType); + cache(this, args); + } + } + + /// + /// Called just after the script has been executed + /// + /// scipt execution result + private void RaiseScriptExecutionFinished(ScriptExecutionResult result) + { + try + { + DisconnectSqlCmdInternal(); + + ConfigureBatchEventHandlers(currentBatch, batchEventHandlers, false); + + ResetScript(); + } + finally + { + EventHandler cache = ScriptExecutionFinished; + if (cache != null) + { + ScriptExecutionFinishedEventArgs args = new ScriptExecutionFinishedEventArgs(result); + cache(this, args); + } + } + } + + /// + /// Called when the script parsing has errors/warnings + /// + /// + /// + private void RaiseScriptError(string message, ScriptMessageType messageType) + { + switch (messageType) + { + case (ScriptMessageType.FatalError): + RaiseBatchParserExecutionError(SR.EE_ScriptError_FatalError, message, messageType); + break; + case (ScriptMessageType.Error): + RaiseBatchParserExecutionError(SR.EE_ScriptError_Error, message, messageType); + break; + default: + Debug.Assert(messageType == ScriptMessageType.Warning); + RaiseBatchParserExecutionError(SR.EE_ScriptError_Warning, message, messageType); + break; + } + } + + /// + /// Called just after batch has been executed + /// + /// + /// + private void RaiseBatchParserExecutionFinished(Batch batch, ScriptExecutionResult batchResult) + { + Debug.Assert(batch != null); + + EventHandler cache = BatchParserExecutionFinished; + if (cache != null) + { + BatchParserExecutionFinishedEventArgs args = new BatchParserExecutionFinishedEventArgs(batchResult, batch); + cache(this, args); + } + } + + /// + /// Called right before a batch is executed + /// + /// + /// + private void RaiseBatchParserExecutionStarted(Batch batch, TextSpan textSpan) + { + Debug.Assert(batch != null); + + EventHandler cache = BatchParserExecutionStart; + if (cache != null) + { + // TODO, fawinter: Get the batch line number as a parameter and pass it in + BatchParserExecutionStartEventArgs args = new BatchParserExecutionStartEventArgs(textSpan, batch); + cache(this, args); + } + } + + /// + /// Called when a message needs to be notified to the consumer + /// + /// + private void RaiseBatchMessage(string message) + { + Validate.IsNotNullOrEmptyString(nameof(message), message); + + if (batchEventHandlers != null) + { + BatchMessageEventArgs args = new BatchMessageEventArgs(message); + batchEventHandlers.OnBatchMessage(this, args); + } + } + + /// + /// Executes a given batch given the number of times + /// + /// + /// + /// + /// True if we should continue processing, false otherwise + private bool ExecuteBatchInternal( + string batchScript, + int num, + int lineNumber) + { + if (lineNumber == -1) + { + //it means that there was not a single sqlcmd command, + //including Batch Delimiter (i.e.) "GO" at the end of the batch. + //it should be adjusted it to be the very first line in this case + lineNumber = 0; + } + + TextSpan localTextSpan = new TextSpan(); + localTextSpan.iStartLine = lineNumber; + + if (!String.IsNullOrEmpty(batchScript)) + { + bool continueProcessing = true; + numBatchExecutionTimes = num; + ExecuteBatchTextSpanInternal(batchScript, localTextSpan, out continueProcessing); + return continueProcessing; + } + else + { + return true; + } + } + + /// + /// Executes the batch text given the text span + /// + /// + /// + /// + private void ExecuteBatchTextSpanInternal(string batchScript, TextSpan textSpan, out bool continueProcessing) + { + Debug.Assert(!String.IsNullOrEmpty(batchScript)); + continueProcessing = true; + + if (batchScript.Trim().Length <= 0) + { + result |= ScriptExecutionResult.Success; + return; + } + + Debug.Assert(currentBatch != null); + + if (executionState == ExecutionState.Cancelling) + { + result = ScriptExecutionResult.Cancel; + } + else + { + currentBatch.Reset(); + currentBatch.Text = batchScript; + currentBatch.TextSpan = textSpan; + currentBatch.BatchIndex = currentBatchIndex; + + currentBatchIndex++; + + if (conditions != null) + { + currentBatch.IsSuppressProviderMessageHeaders = conditions.IsSuppressProviderMessageHeaders; + + // TODO this is associated with Dacfx specific situations, so uncomment if need be + //currentBatch.IsScriptExecutionTracked = conditions.IsScriptExecutionTracked; + if (conditions.IsScriptExecutionTracked) + { + currentBatch.ScriptTrackingId = scriptTrackingId++; + } + } + + //ExecutingBatch state means currentBatch is valid to use from another thread to Cancel + executionState = ExecutionState.ExecutingBatch; + } + + ScriptExecutionResult batchResult = ScriptExecutionResult.Failure; + if (result != ScriptExecutionResult.Cancel) + { + bool isExecutionDiscarded = false; + try + { + RaiseBatchParserExecutionStarted(currentBatch, textSpan); + + if (!isLocalParse) + { + batchResult = DoBatchExecution(currentBatch); + } + else + { + batchResult = ScriptExecutionResult.Success; + } + } + finally + { + isExecutionDiscarded = (executionState == ExecutionState.Discarded); + if (executionState == ExecutionState.Cancelling || isExecutionDiscarded) + { + batchResult = ScriptExecutionResult.Cancel; + } + else + { + executionState = ExecutionState.Executing; + } + } + + if (!isExecutionDiscarded) + { + RaiseBatchParserExecutionFinished(currentBatch, batchResult); + } + } + else + { + batchResult = ScriptExecutionResult.Cancel; + } + + //if we're in Cancel or Halt state, do some special actions + if (batchResult == ScriptExecutionResult.Cancel || batchResult == ScriptExecutionResult.Halted) + { + result = batchResult; + continueProcessing = false; + return; + } + else + { + result |= batchResult; + } + } + + /// + /// Executes the script by calling ManagedBatchParser.Parse() + /// + /// The parser will in turn call to the ProcessBatch() which is the + /// one starting the execution process + /// + /// + private void DoScriptExecution(bool isBatchParser) + { + ConfigureBatch(); + + if (isBatchParser) + { + ConfigureBatchParser(); + + try + { + commandParser.Parse(); + } + catch (BatchParserException ex) + { + if (ex.ErrorCode != ErrorCode.Aborted) + { + result = ScriptExecutionResult.Failure; + string info = ex.Text; + + RaiseScriptError(String.Format(CultureInfo.CurrentCulture, SR.EE_ScriptError_ParsingSyntax, info), ScriptMessageType.FatalError); + } + } + catch (Exception ex) + { + Logger.Write(LogLevel.Warning, "Exception Caught in ExecutionEngine.DoScriptExecution(bool): " + ex.ToString()); + throw; + } + } + else + { + ExecuteBatchInternal(script, /* num */ 1, /* lineNumber */ 0); + } + + } + + /// + /// Executes the script (on a separated thread) + /// + private void DoExecute(bool isBatchParser) + { + //we should not be in the middle of execution here + if (executionState == ExecutionState.Executing || executionState == ExecutionState.ExecutingBatch) + { + throw new InvalidOperationException(SR.EE_ExecutionNotYetCompleteError); + } + + executionState = ExecutionState.Initial; + result = ScriptExecutionResult.Failure; + currentBatchIndex = 0; + currentBatch.ExecutionTimeout = executionTimeout; + expectedShowPlan = ShowPlanType.None; + + if (!isLocalParse) + { + errorAction = conditions.IsHaltOnError ? + OnErrorAction.Exit : + OnErrorAction.Ignore; + + CreatePrePostConditionBatches(); + } + + ConfigureBatchEventHandlers(currentBatch, batchEventHandlers, true); + + // do we have a cancel request already? + lock (stateSyncLock) + { + if (executionState == ExecutionState.Cancelling) + { + RaiseScriptExecutionFinished(ScriptExecutionResult.Cancel); + return; + } + Debug.Assert(executionState == ExecutionState.Initial); + executionState = ExecutionState.Executing; + } + + if ((result = ExecutePrePostConditionBatches(preConditionBatches)) == ScriptExecutionResult.Success) + { + DoScriptExecution(isBatchParser); + } + + if (!CheckForDiscardedConnection()) + { + if (!isLocalParse) + { + if (conditions.IsTransactionWrapped && !conditions.IsParseOnly) + { + if (result == ScriptExecutionResult.Success) + { + postConditionBatches.Add(new Batch(ExecutionEngineConditions.CommitTransactionStatement, false, executionTimeout)); + } + else + { + postConditionBatches.Add(new Batch(ExecutionEngineConditions.RollbackTransactionStatement, false, executionTimeout)); + } + } + + // no need to update the result value as it has been updated by the DoScriptExecution() + ExecutePrePostConditionBatches(postConditionBatches); + } + + //fire an event that we're done with execution of all batches + if (result == ScriptExecutionResult.Halted) //remap into failure + { + result = ScriptExecutionResult.Failure; + } + + RaiseScriptExecutionFinished(result); + } + } + + /// + /// Cancels the current batch being executed + /// + /// + /// This method is meant to be called from a separate thread + /// in combination with the Cancel method() + /// + public void CancelCurrentBatch() + { + ExecutionState state; + lock (stateSyncLock) + { + state = executionState; + executionState = ExecutionState.Cancelling; + + if (state == ExecutionState.ExecutingBatch) + { + Debug.Assert(currentBatch != null); + if (currentBatch != null) + { + currentBatch.Cancel(); + } + } + } + } + + private void Discard() + { + Debug.WriteLine("ExecutionEngine.Cancel(): Thread didn't cancel"); + + ConfigureBatchEventHandlers(currentBatch, batchEventHandlers, false); + + lock (stateSyncLock) + { + executionState = ExecutionState.Discarded; + } + } + + /// + /// Gets the Batch Separator statement + /// + private string BatchSeparator + { + get + { + if (conditions != null) + { + return conditions.BatchSeparator; + } + else + { + return ExecutionEngineConditions.BatchSeparatorStatement; + } + } + } + + + /// + /// Create a set of batches to be executed before and after the script is executed + /// + /// + /// This is the way some server side settings can be set. Additionally, it supports + /// a way to wrap the script execution within a transaction block + /// + private void CreatePrePostConditionBatches() + { + StringBuilder scriptPreBatches = new StringBuilder(); + StringBuilder scriptPostBatches = new StringBuilder(); + int serverVersion = 8; + + if (connection != null && connection.State == ConnectionState.Open) + { + serverVersion = new Version(ReliableConnectionHelper.ReadServerVersion(connection)).Major; + } + + ConfigurePrePostConditionBatches(preConditionBatches); + ConfigurePrePostConditionBatches(postConditionBatches); + + if (conditions.IsNoExec) + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.NoExecStatement(false)); + } + + if (conditions.IsStatisticsIO) + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.StatisticsIOStatement(true)); + scriptPostBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.StatisticsIOStatement(false)); + } + + if (conditions.IsStatisticsTime) + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.StatisticsTimeStatement(true)); + scriptPostBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.StatisticsTimeStatement(false)); + } + + if (conditions.IsEstimatedShowPlan) + { + if (serverVersion >= 9) + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.ShowPlanXmlStatement(true)); + scriptPostBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.ShowPlanXmlStatement(false)); + expectedShowPlan = ShowPlanType.EstimatedXmlShowPlan; + } + else + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.ShowPlanAllStatement(true)); + scriptPostBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.ShowPlanAllStatement(false)); + expectedShowPlan = ShowPlanType.EstimatedExecutionShowPlan; + } + } + else if (conditions.IsActualShowPlan) + { + if (serverVersion >= 9) + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.StatisticsXmlStatement(true)); + scriptPostBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.StatisticsXmlStatement(false)); + expectedShowPlan = ShowPlanType.ActualXmlShowPlan; + } + else + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.StatisticsProfileStatement(true)); + scriptPostBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.StatisticsProfileStatement(false)); + expectedShowPlan = ShowPlanType.ActualExecutionShowPlan; + } + } + + if (conditions.IsTransactionWrapped) + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.BeginTransactionStatement); + // issuing a Rollback or a Commit will depend on the script execution result + } + + if (conditions.IsParseOnly) + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.ParseOnlyStatement(true)); + scriptPostBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.ParseOnlyStatement(false)); + } + + if (conditions.IsNoExec) + { + scriptPreBatches.AppendFormat(CultureInfo.InvariantCulture, "{0} ", ExecutionEngineConditions.NoExecStatement(true)); + } + + if (conditions.IsShowPlanText && + !conditions.IsEstimatedShowPlan && + !conditions.IsActualShowPlan) + { + // SET SHOWPLAN_TEXT cannot be used with other statements in the batch + preConditionBatches.Insert(0, + new Batch( + String.Format(CultureInfo.CurrentCulture, "{0} ", ExecutionEngineConditions.ShowPlanTextStatement(true)), + false, + executionTimeout)); + + postConditionBatches.Insert(0, + new Batch( + String.Format(CultureInfo.CurrentCulture, "{0} ", ExecutionEngineConditions.ShowPlanTextStatement(false)), + false, + executionTimeout)); + } + + string preBatches = scriptPreBatches.ToString().Trim(); + string postBatches = scriptPostBatches.ToString().Trim(); + + if (scriptPreBatches.Length > 0) + { + preConditionBatches.Add(new Batch(preBatches, false, executionTimeout)); + } + + if (scriptPostBatches.Length > 0) + { + postConditionBatches.Add(new Batch(postBatches, false, executionTimeout)); + } + } + + /// + /// Executes a list of batches related to the Pre and Post scripts + /// + /// + private ScriptExecutionResult ExecutePrePostConditionBatches(IList batches) + { + Validate.IsNotNull(nameof(batches), batches); + + ScriptExecutionResult result = ScriptExecutionResult.Success; + + foreach (Batch batch in batches) + { + try + { + ConfigureBatchEventHandlers(batch, batchEventHandlers, true); + result = batch.Execute(connection, ShowPlanType.None); + } + catch (SqlException) + { + result = ScriptExecutionResult.Failure; + } + finally + { + ConfigureBatchEventHandlers(batch, batchEventHandlers, false); + } + + if (result != ScriptExecutionResult.Success) + { + break; + } + } + + return result; + } + + /// + /// Cleans up any prev + /// + private static void ConfigurePrePostConditionBatches(IList batches) + { + Validate.IsNotNull(nameof(batches), batches); + + batches.Clear(); + } + + /// + /// Binds/Unbinds the methods defined in IBatchEventHandlers with the batch events + /// + /// Batch to be used in the event binding + /// object implementing the IBatcgEventHandlers interface + /// Binds or Unbinds the evnts + private static void ConfigureBatchEventHandlers(Batch batch, IBatchEventsHandler handlers, bool isHookup) + { + Validate.IsNotNull(nameof(batch), batch); + + if (isHookup) + { + Validate.IsNotNull(nameof(handlers), handlers); + + batch.BatchError += new EventHandler(handlers.OnBatchError); + batch.BatchMessage += new EventHandler(handlers.OnBatchMessage); + batch.BatchResultSetProcessing += new EventHandler(handlers.OnBatchResultSetProcessing); + batch.BatchResultSetFinished += new EventHandler(handlers.OnBatchResultSetFinished); + batch.BatchCancelling += new EventHandler(handlers.OnBatchCancelling); + } + else + { + if (handlers != null) + { + batch.BatchError -= new EventHandler(handlers.OnBatchError); + batch.BatchMessage -= new EventHandler(handlers.OnBatchMessage); + batch.BatchResultSetProcessing -= new EventHandler(handlers.OnBatchResultSetProcessing); + batch.BatchResultSetFinished -= new EventHandler(handlers.OnBatchResultSetFinished); + batch.BatchCancelling -= new EventHandler(handlers.OnBatchCancelling); + } + } + } + + /// + /// If a discarded state is found, we will close the connection + /// + /// + /// The discarded state is possible only on a synch Cancel request + /// + /// + /// True if this is discarded connection + /// + private bool CheckForDiscardedConnection() + { + bool isDiscarded = false; + lock (stateSyncLock) + { + isDiscarded = (executionState == ExecutionState.Discarded); + } + + if (isDiscarded) + { + Debug.WriteLine("ExecutionEngine.CheckForDiscardedConnection"); + + ResetScript(); + + CloseConnection(connection); + + return true; + } + + return false; + } + + #endregion + + #region Private SqlCmd related methods + + /// + /// Called when parser is about to halt the execution + /// + private void OnHaltParser() + { + result = ScriptExecutionResult.Halted; + } + + /// + /// Changed when parser changed the error action type + /// + /// + private void OnErrorActionChanged(OnErrorAction ea) + { + errorAction = ea; + } + + /// + /// Called when parser requests a new connection + /// + /// + private void OnConnectionChanged(SqlConnectionStringBuilder connectionStringBuilder) + { + // make sure that we disconnect any previous SqlCmd connection + DisconnectSqlCmdInternal(); + + // create a new SqlCmd connection + SqlConnection connection = ConnectSqlCmdInternal(connectionStringBuilder); + if (connection != null) + { + isSqlCmdConnection = true; + this.connection = connection; + + CreatePrePostConditionBatches(); + result = ExecutePrePostConditionBatches(preConditionBatches); + } + } + + /// + /// Connects when :connect is identified within the script + /// + /// + /// + private static SqlConnection ConnectSqlCmdInternal(SqlConnectionStringBuilder connectionStringBuilder) + { + Validate.IsNotNull(nameof(connectionStringBuilder), connectionStringBuilder); + + SqlConnection connection = null; + + try + { + connection = new SqlConnection(connectionStringBuilder.ConnectionString); + connection.Open(); + } + catch (SqlException ex) + { + Logger.Write(LogLevel.Warning, "Exception Caught in ExecutionEngine.ConnectSqlCmdInternal(SqlConnectionStringBuilder): " + ex.ToString()); + throw; + } + + return connection; + } + + /// + /// Disconnects a sqlcmd connection + /// + private void DisconnectSqlCmdInternal() + { + if (isSqlCmdConnection) + { + RaiseBatchMessage(String.Format(CultureInfo.CurrentCulture, "Disconnection from server {0}", ReliableConnectionHelper.GetServerName(connection))); + CloseConnection(connection); + } + } + #endregion + + #region Private methods + + /// + /// Closes a connection + /// + /// + static private void CloseConnection(IDbConnection connection) + { + if (connection != null && connection.State == ConnectionState.Open) + { + try + { + connection.Close(); + } + catch (SqlException ex) + { + Logger.Write(LogLevel.Warning, "Exception Caught in ExecutionEngine.CloseConnection(SqlConnection): " + ex.ToString()); + } + } + } + + /// + /// Setups the script execution + /// + /// + private void ExecuteInternal(ScriptExecutionArgs scriptExecutionArgs, bool isBatchParser) + { + + Validate.IsNotNull(nameof(scriptExecutionArgs), scriptExecutionArgs); + + Validate.IsNotNullOrEmptyString(nameof(scriptExecutionArgs.Script), scriptExecutionArgs.Script); + Validate.IsNotNull(nameof(scriptExecutionArgs.ReliableConnection), scriptExecutionArgs.ReliableConnection); + Validate.IsNotNull(nameof(scriptExecutionArgs.Conditions), scriptExecutionArgs.Conditions); + Validate.IsNotNull(nameof(scriptExecutionArgs.BatchEventHandlers), scriptExecutionArgs.BatchEventHandlers); + + Debug.Assert(scriptExecutionArgs.TimeOut >= 0); + + executionTimeout = scriptExecutionArgs.TimeOut < 0 ? 0 : scriptExecutionArgs.TimeOut; + connection = scriptExecutionArgs.ReliableConnection; + conditions = new ExecutionEngineConditions(scriptExecutionArgs.Conditions); + script = scriptExecutionArgs.Script; + isSqlCmdConnection = false; + batchEventHandlers = scriptExecutionArgs.BatchEventHandlers; + startingLine = scriptExecutionArgs.StartingLine; + internalVariables = scriptExecutionArgs.Variables; + + DoExecute(isBatchParser); + } + + #endregion + + #region Public Events + + /// + /// This event gets fired when execution of one batch is completed + /// + public event EventHandler BatchParserExecutionFinished = null; + + /// + /// This event gets fired when execution of a batch is about to start + /// + public event EventHandler BatchParserExecutionStart = null; + + /// + /// This event gets fired when when there's an error/warnings from the scripting engine + /// + public event EventHandler BatchParserExecutionError = null; + + /// + /// This event gets fired when the script execution is completed + /// + public event EventHandler ScriptExecutionFinished = null; + + #endregion + + #region Public members + + /// + /// Executes the script + /// + /// Script to be executed + public void ExecuteScript(object scriptArgs) + { + ExecuteInternal(scriptArgs as ScriptExecutionArgs, /* isBatchParser */ true); + } + + /// + /// Executes a given batch + /// + /// + /// + public void ExecuteBatch(ScriptExecutionArgs scriptExecutionArgs) + { + ExecuteInternal(scriptExecutionArgs, /* isBatchParser */ false); + } + + /// + /// Parses the script locally + /// + /// script to parse + /// batch handler + /// + /// The batch parser functionality is used in this case + /// + public void ParseScript(string script, IBatchEventsHandler batchEventsHandler) + { + Validate.IsNotNullOrEmptyString(nameof(script), script); + Validate.IsNotNull(nameof(batchEventsHandler), batchEventsHandler); + + + this.script = script; + batchEventHandlers = batchEventsHandler; + isLocalParse = true; + + DoExecute(/* isBatchParser */ true); + } + + /// + /// Close the current connection + /// + /// + public void Close(bool isCloseConnection) + { + Close(isCloseConnection, /* isDiscard */ false); + } + + /// + /// Close/Discard the current connection + /// + /// + /// + public void Close(bool isCloseConnection, bool isDiscard) + { + Close(isCloseConnection, isDiscard, /* isFinishExecution */ false); + } + + /// + /// Close/Discard the current connection + /// + /// true if connection has to be closed + /// true if connection has to be discarded + /// Raises the script execution finish event + public void Close(bool isCloseConnection, bool isDiscard, bool isFinishExecution) + { + if (isFinishExecution) + { + RaiseScriptExecutionFinished(ScriptExecutionResult.Cancel); + } + + if (isDiscard) + { + Discard(); + } + else + { + if (isCloseConnection) + { + CloseConnection(connection); + } + } + } + + /// + /// Performs application-defined tasks associated with freeing, releasing, or + // resetting unmanaged resources. + /// + public void Dispose() + { + Dispose(true); + } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + //Debug.WriteLine("ExecutionEngine.Dispose"); + if (commandParser != null) + { + commandParser.Dispose(); + commandParser = null; + } + + ResetScript(); + + stateSyncLock = null; + currentBatch = null; + } + } + #endregion + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionEngineConditions.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionEngineConditions.cs new file mode 100644 index 00000000..fcf2a394 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionEngineConditions.cs @@ -0,0 +1,277 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Collections.Specialized; +using Microsoft.SqlTools.ServiceLayer.Utility; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + internal class ExecutionEngineConditions + { + + #region Private fields + private static class Consts + { + public static string On = "ON"; + public static string Off = "OFF"; + public static string ParseOnly = "SET PARSEONLY {0}"; + public static string NoExec = "SET NOEXEC {0}"; + public static string StatisticsIO = "SET STATISTICS IO {0}"; + public static string StatisticsTime = "SET STATISTICS TIME {0}"; + public static string ShowPlanXml = "SET SHOWPLAN_XML {0}"; + public static string ShowPlanAll = "SET SHOWPLAN_ALL {0}"; + public static string ShowPlanText = "SET SHOWPLAN_TEXT {0}"; + public static string StatisticsXml = "SET STATISTICS XML {0}"; + public static string StatisticsProfile = "SET STATISTICS PROFILE {0}"; + public static string BeginTrans = "BEGIN TRAN"; + public static string CommitTrans = "COMMIT TRAN"; + public static string Rollback = "ROLLBACK"; + public static string BatchSeparator = "GO"; + + public static string Reset = "SET NOEXEC, FMTONLY OFF, PARSEONLY, SET SHOWPLAN_ALL, SET SHOWPLAN_TEXT"; + } + + private static readonly int stateParseOnly = BitVector32.CreateMask(); + private static readonly int stateTransactionWrapped = BitVector32.CreateMask(stateParseOnly); + private static readonly int stateHaltOnError = BitVector32.CreateMask(stateTransactionWrapped); + private static readonly int stateEstimatedShowPlan = BitVector32.CreateMask(stateHaltOnError); + private static readonly int stateActualShowPlan = BitVector32.CreateMask(stateEstimatedShowPlan); + private static readonly int stateSuppressProviderMessageHeaders = BitVector32.CreateMask(stateActualShowPlan); + private static readonly int stateNoExec = BitVector32.CreateMask(stateSuppressProviderMessageHeaders); + private static readonly int stateStatisticsIO = BitVector32.CreateMask(stateNoExec); + private static readonly int stateShowPlanText = BitVector32.CreateMask(stateStatisticsIO); + private static readonly int stateStatisticsTime = BitVector32.CreateMask(stateShowPlanText); + private static readonly int stateSqlCmd = BitVector32.CreateMask(stateStatisticsTime); + private static readonly int stateScriptExecutionTracked = BitVector32.CreateMask(stateSqlCmd); + + private BitVector32 state = new BitVector32(); + private string batchSeparator = Consts.BatchSeparator; + + #endregion + + #region Constructors / Destructor + + /// + /// Default constructor + /// + public ExecutionEngineConditions() + { + // nothing + } + + /// + /// Overloaded constructor taking another ExecutionEngineCondition object as a reference + /// + public ExecutionEngineConditions(ExecutionEngineConditions condition) + { + state = condition.state; + batchSeparator = condition.batchSeparator; + } + #endregion + + #region Statement strings + + public static string ShowPlanXmlStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.ShowPlanXml, (isOn ? Consts.On : Consts.Off)); + } + + public static string ShowPlanAllStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.ShowPlanAll, (isOn ? Consts.On : Consts.Off)); + } + + public static string ShowPlanTextStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.ShowPlanText, (isOn ? Consts.On : Consts.Off)); + } + + public static string StatisticsXmlStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.StatisticsXml, (isOn ? Consts.On : Consts.Off)); + } + + public static string StatisticsProfileStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.StatisticsProfile, (isOn ? Consts.On : Consts.Off)); + } + + public static string ParseOnlyStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.ParseOnly, (isOn ? Consts.On : Consts.Off)); + } + + public static string NoExecStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.NoExec, (isOn ? Consts.On : Consts.Off)); + } + + public static string StatisticsIOStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.StatisticsIO, (isOn ? Consts.On : Consts.Off)); + } + + public static string StatisticsTimeStatement(bool isOn) + { + return string.Format(System.Globalization.CultureInfo.InvariantCulture, Consts.StatisticsTime, (isOn ? Consts.On : Consts.Off)); + } + + public static string BeginTransactionStatement + { + get { return Consts.BeginTrans; } + } + + public static string CommitTransactionStatement + { + get { return Consts.CommitTrans; } + } + + public static string RollbackTransactionStatement + { + get { return Consts.Rollback; } + } + + public static string BatchSeparatorStatement + { + get { return Consts.BatchSeparator; } + } + + public static string ResetStatement + { + get { return Consts.Reset; } + } + + #endregion + + #region Public properties + + /// + /// Checks the syntax of each Transact-SQL statement and returns any error messages + /// without compiling or executing the statement. + /// + public bool IsParseOnly + { + get { return state[stateParseOnly]; } + set { state[stateParseOnly] = value; } + } + + /// + /// Script is wrapped withint BEGIN TRAN/COMMIT-ROLLBACK + /// + public bool IsTransactionWrapped + { + get { return state[stateTransactionWrapped]; } + set { state[stateTransactionWrapped] = value; } + } + + /// + /// Gets or a set a value indicating whether script execution is tracked + /// + public bool IsScriptExecutionTracked + { + get { return state[stateScriptExecutionTracked]; } + set { state[stateScriptExecutionTracked] = value; } + } + + /// + /// Halts the execution if an error is found + /// + public bool IsHaltOnError + { + get { return state[stateHaltOnError]; } + set { state[stateHaltOnError] = value; } + } + + /// + /// Use estimated show plan + /// + public bool IsEstimatedShowPlan + { + get { return state[stateEstimatedShowPlan]; } + set { state[stateEstimatedShowPlan] = value; } + } + + /// + /// Use actual show plan + /// + public bool IsActualShowPlan + { + get { return state[stateActualShowPlan]; } + set { state[stateActualShowPlan] = value; } + } + + /// + /// Use Source information on messages shown to the user + /// + public bool IsSuppressProviderMessageHeaders + { + get { return state[stateSuppressProviderMessageHeaders]; } + set { state[stateSuppressProviderMessageHeaders] = value; } + } + + /// + /// SET NO EXEC {on/off} + /// + public bool IsNoExec + { + get { return state[stateNoExec]; } + set { state[stateNoExec] = value; } + } + + /// + /// SET STATISTICS IO {on/off} + /// + public bool IsStatisticsIO + { + get { return state[stateStatisticsIO]; } + set { state[stateStatisticsIO] = value; } + } + + /// + /// SET SHOWPLAN_TEXT {on/off} + /// + public bool IsShowPlanText + { + get { return state[stateShowPlanText]; } + set { state[stateShowPlanText] = value; } + } + + /// + /// SET STATISTICS IO {on/off} + /// + public bool IsStatisticsTime + { + get { return state[stateStatisticsTime]; } + set { state[stateStatisticsTime] = value; } + } + + /// + /// SqlCmd support + /// + public bool IsSqlCmd + { + get { return state[stateSqlCmd]; } + set { state[stateSqlCmd] = value; } + } + + /// + /// Batch separator statement + /// + public string BatchSeparator + { + get + { + return batchSeparator; + } + set + { + Validate.IsNotNullOrEmptyString(nameof(value), value); + batchSeparator = value; + } + } + + #endregion + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionState.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionState.cs new file mode 100644 index 00000000..68ccc31e --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ExecutionState.cs @@ -0,0 +1,16 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + internal enum ExecutionState + { + Initial, + Executing, + ExecutingBatch, + Cancelling, + Discarded + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/IBatchEventsHandler.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/IBatchEventsHandler.cs new file mode 100644 index 00000000..4cc727f8 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/IBatchEventsHandler.cs @@ -0,0 +1,40 @@ +// +// 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.ServiceLayer.BatchParser.ExecutionEngineCode +{ + internal interface IBatchEventsHandler + { + /// + /// fired when there is an error message from the server + /// + void OnBatchError(object sender, BatchErrorEventArgs args); + + /// + /// fired when there is a message from the server + /// + void OnBatchMessage(object sender, BatchMessageEventArgs args); + + /// + /// fired when there is a new result set available. It is guarnteed + /// to be fired from the same thread that called Execute method + /// + void OnBatchResultSetProcessing(object sender, BatchResultSetEventArgs args); + + /// + /// fired when we've done absolutely all actions for the current result set + /// + void OnBatchResultSetFinished(object sender, EventArgs args); + + /// + /// fired when the batch recieved cancel request BEFORE it + /// initiates cancel operation. Note that it is fired from a + /// different thread then the one used to kick off execution + /// + void OnBatchCancelling(object sender, EventArgs args); + } +} \ No newline at end of file diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionArgs.cs new file mode 100644 index 00000000..29349529 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionArgs.cs @@ -0,0 +1,143 @@ +// +// 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.Data; +using System.Data.SqlClient; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + internal class ScriptExecutionArgs : EventArgs + { + private IDbConnection connection; + private IBatchEventsHandler batchEventHandlers; + private int startingLine; + private Dictionary cmdVariables; + + #region Constructors / Destructor + + /// + /// Constructor method for ScriptExecutionArgs + /// + public ScriptExecutionArgs( + string script, + SqlConnection connection, + int timeOut, + ExecutionEngineConditions conditions, + IBatchEventsHandler batchEventHandlers) + : this (script, (IDbConnection)connection, timeOut, conditions, batchEventHandlers) + { + // nothing + } + + /// + /// Constructor method for ScriptExecutionArgs + /// + public ScriptExecutionArgs( + string script, + SqlConnection connection, + int timeOut, + ExecutionEngineConditions conditions, + IBatchEventsHandler batchEventHandlers, + int startingLine, + IDictionary variables) + : this(script, (IDbConnection) connection, timeOut, conditions, batchEventHandlers, startingLine, variables) + { + // nothing + } + + /// + /// Constructor method for ScriptExecutionArgs + /// + public ScriptExecutionArgs( + string script, + IDbConnection connection, + int timeOut, + ExecutionEngineConditions conditions, + IBatchEventsHandler batchEventHandlers) + : this(script, connection, timeOut, conditions, batchEventHandlers, 0, null) + { + // nothing + } + + /// + /// Constructor method for ScriptExecutionArgs + /// + public ScriptExecutionArgs( + string script, + IDbConnection connection, + int timeOut, + ExecutionEngineConditions conditions, + IBatchEventsHandler batchEventHandlers, + int startingLine, + IDictionary variables) + { + Script = script; + this.connection = connection; + TimeOut = timeOut; + Conditions = conditions; + this.batchEventHandlers = batchEventHandlers; + this.startingLine = startingLine; + + if (variables != null) + { + foreach (var variable in variables) + { + Variables[variable.Key] = variable.Value; + } + } + } + + #endregion + + #region Public properties + + public string Script { get; set; } + + // FUTURE CLEANUP: Remove in favor of general signature (IDbConnection) - #920978 + public SqlConnection Connection + { + get { return connection as SqlConnection; } + set { connection = value as SqlConnection; } + } + + public IDbConnection ReliableConnection + { + get { return connection; } + set { connection = value; } + } + + public int TimeOut { get; set; } + + internal ExecutionEngineConditions Conditions { get; set; } + + internal IBatchEventsHandler BatchEventHandlers + { + get { return batchEventHandlers; } + set { batchEventHandlers = value; } + } + + internal int StartingLine + { + get { return startingLine; } + set { startingLine = value; } + } + + internal Dictionary Variables + { + get + { + if (cmdVariables == null) + { + cmdVariables = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + } + + return cmdVariables; + } + } + #endregion + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionFinishedEventArgs.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionFinishedEventArgs.cs new file mode 100644 index 00000000..855b8365 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionFinishedEventArgs.cs @@ -0,0 +1,29 @@ +// +// 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.ServiceLayer.BatchParser.ExecutionEngineCode +{ + internal class ScriptExecutionFinishedEventArgs : EventArgs + { + internal ScriptExecutionFinishedEventArgs(ScriptExecutionResult result) + { + ExecutionResult = result; + } + + public ScriptExecutionResult ExecutionResult + { + private set; + get; + } + + public bool Disposing + { + get; + set; + } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionResult.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionResult.cs new file mode 100644 index 00000000..5c48dec6 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptExecutionResult.cs @@ -0,0 +1,20 @@ +// +// 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.ServiceLayer.BatchParser.ExecutionEngineCode +{ + [Flags] + internal enum ScriptExecutionResult + { + Success = 0x1, + Failure = 0x2, + Cancel = 0x4, + Halted = 0x8, + All = 0x0F + } + +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptMessageType.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptMessageType.cs new file mode 100644 index 00000000..d9774e61 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ScriptMessageType.cs @@ -0,0 +1,14 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + internal enum ScriptMessageType + { + FatalError, + Error, + Warning + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ShowPlanType.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ShowPlanType.cs new file mode 100644 index 00000000..01acfd98 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/ShowPlanType.cs @@ -0,0 +1,20 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + [System.Flags] + internal enum ShowPlanType + { + None = 0x0, + ActualExecutionShowPlan = 0x1, + ActualXmlShowPlan = 0x2, + EstimatedExecutionShowPlan = 0x4, + EstimatedXmlShowPlan = 0x8, + AllXmlShowPlan = ActualXmlShowPlan | EstimatedXmlShowPlan, + AllExecutionShowPlan = ActualExecutionShowPlan | EstimatedExecutionShowPlan, + AllShowPlan = AllExecutionShowPlan | AllXmlShowPlan + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/TextSpan.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/TextSpan.cs new file mode 100644 index 00000000..24fd35e5 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ExecutionEngineCode/TextSpan.cs @@ -0,0 +1,15 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode +{ + internal struct TextSpan + { + public int iEndIndex; + public int iEndLine; + public int iStartIndex; + public int iStartLine; + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ICommandHandler.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ICommandHandler.cs new file mode 100644 index 00000000..02117f9a --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/ICommandHandler.cs @@ -0,0 +1,16 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.IO; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal interface ICommandHandler + { + BatchParserAction Go(TextBlock batch, int repeatCount); + BatchParserAction OnError(Token token, OnErrorAction action); + BatchParserAction Include(TextBlock filename, out TextReader stream, out string newFilename); + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/IVariableResolver.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/IVariableResolver.cs new file mode 100644 index 00000000..8573b55f --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/IVariableResolver.cs @@ -0,0 +1,13 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal interface IVariableResolver + { + string GetVariable(PositionStruct pos, string name); + void SetVariable(PositionStruct pos, string name, string value); + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Lexer.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Lexer.cs new file mode 100644 index 00000000..adc826a8 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Lexer.cs @@ -0,0 +1,747 @@ +// +// 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.Diagnostics; +using System.Globalization; +using System.IO; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + /// + /// Lexer class for the SMO Batch Parser + /// + internal sealed class Lexer : IDisposable + { + private LexerInput currentInput; + private bool popInputAtNextConsume; + private Token currentToken; + private ErrorCode errorCode = ErrorCode.Success; + private readonly Stack inputStack = new Stack(); + private Func lexerFunc; + private TextRuleFlags textRuleFlags; + private PositionStruct tokenBeginPosition; + + /// + /// Constructor for the lexer class used by SMO Batch Parser + /// + public Lexer(TextReader input, string name) + { + currentInput = new LexerInput(input, name); + currentToken = null; + RecognizeSqlCmdSyntax = true; + + SetState(RuleLine); + } + + /// + /// Get current token for the lexer + /// + public Token CurrentToken + { + get { + return currentToken; + } + } + + /// + /// Get current token type for the lexer + /// + public LexerTokenType CurrentTokenType + { + get { return currentToken.TokenType; } + } + + /// + /// Consume the token + /// + public void ConsumeToken() + { + if (currentInput == null) + { + return; + } + + bool result; + tokenBeginPosition = new PositionStruct(currentInput.CurrentLine, currentInput.CurrentColumn, currentInput.CurrentOffset, currentInput.Filename); + + do + { + if (popInputAtNextConsume) + { + PopAndCloseInput(); + popInputAtNextConsume = false; + } + do + { + result = lexerFunc(); + } while (result == false); + if (CurrentTokenType == LexerTokenType.Eof) + { + popInputAtNextConsume = true; + if(inputStack.Count > 0) + { + // report as empty NewLine token + currentToken = new Token( + LexerTokenType.NewLine, tokenBeginPosition, tokenBeginPosition, string.Empty, tokenBeginPosition.Filename); + } + } + } while (result == false); + } + + public void Dispose() + { + while (inputStack.Count > 0) + { + PopAndCloseInput(); + } + } + + public void PopAndCloseInput() + { + if (currentInput != null) + { + currentInput.Dispose(); + currentInput = null; + } + if (inputStack.Count > 0) + { + currentInput = inputStack.Pop(); + SetState(RuleLine); + } + } + + static string GetCircularReferenceErrorMessage(string filename) + { + return string.Format(CultureInfo.CurrentCulture, SR.BatchParser_CircularReference, filename); + } + + /// + /// Push current input into the stack + /// + public void PushInput(TextReader reader, string name) + { + Debug.Assert(currentToken != null && + (currentToken.TokenType == LexerTokenType.NewLine || currentToken.TokenType == LexerTokenType.Eof), "New input can only be pushed after new line token or EOF"); + + if (name.Equals(currentInput.Filename, StringComparison.OrdinalIgnoreCase)) + { + RaiseError(ErrorCode.CircularReference, GetCircularReferenceErrorMessage(name)); + } + + foreach (LexerInput input in inputStack) + { + if (name.Equals(input.Filename, StringComparison.OrdinalIgnoreCase)) + { + RaiseError(ErrorCode.CircularReference, GetCircularReferenceErrorMessage(name)); + } + } + + inputStack.Push(currentInput); + currentInput = new LexerInput(reader, name); + SetState(RuleLine); + // We don't want to close the input, in that case the current file would be taken out of the + // input stack and cycle detection won't work. + popInputAtNextConsume = false; + ConsumeToken(); + } + + private void AcceptBlockComment() + { + char? ch; + int nestingCount = 0; + + Consume(); + do + { + Consume(); + ch = Lookahead(); + + if (ch.HasValue == false) + { + RaiseError(ErrorCode.CommentNotTerminated, + string.Format(CultureInfo.CurrentCulture, SR.BatchParser_CommentNotTerminated)); + } + + if (ch.Value == '*') + { + char? ch2 = Lookahead(1); + if (ch2.HasValue && ch2.Value == '/') + { + Consume(); + if (nestingCount == 0) + { + Consume(); + break; + } + nestingCount--; + } + } + else if (ch.Value == '/') + { + char? ch2 = Lookahead(1); + if (ch2.HasValue && ch2.Value == '*') + { + Consume(); + nestingCount++; + } + } + } while (true); + SetToken(LexerTokenType.Comment); + } + + private void AcceptLineComment() + { + char? ch; + + Consume(); + do + { + Consume(); + ch = Lookahead(); + + if (ch.HasValue == false || IsNewLineChar(ch.Value)) + { + break; + } + } while (true); + SetToken(LexerTokenType.Comment); + } + + private void AcceptIdentifier() + { + char? ch; + + do + { + Consume(); + ch = Lookahead(); + } while (ch.HasValue && IsIdentifierChar(ch.Value)); + SetToken(LexerTokenType.Text); + } + + private void AcceptNewLine() + { + char? ch = Lookahead(); + + if (ch == '\r') + { + Consume(); + ch = Lookahead(); + } + if (ch == '\n') + { + Consume(); + } + + SetToken(LexerTokenType.NewLine); + } + + /// + /// This method reads ahead until the closingChar is found. When closingChar is found, + /// the next character is checked. If it's the same as closingChar, the character is + /// escaped and the method resumes looking for a non-escaped closingChar. + /// + private void AcceptEscapableQuotedText(char closingChar) + { + char? ch; + + while (true) + { + Consume(); + ch = Lookahead(); + if (!ch.HasValue) + { + // we reached the end without finding our closing character. that's an error. + RaiseError(ErrorCode.StringNotTerminated, SR.BatchParser_StringNotTerminated); + break; + } + + if (ch == closingChar) + { + // we found the closing character. we call consume to ensure the pointer is now at the subsequent character. + Consume(); + + // Check whether the subsequent character is also closingChar. + // If it is, that means the closingChar is escaped, so we must continue searching. + // Otherwise, we're finished. + char? nextChar = Lookahead(); + if (!nextChar.HasValue || nextChar != closingChar) + { + break; + } + } + } + } + + /// + /// This method reads ahead until the closingChar is found. This method does not allow for escaping + /// of the closingChar. + /// + private void AcceptQuotedText(char closingChar) + { + char? ch; + + do + { + Consume(); + ch = Lookahead(); + } while (ch.HasValue && ch != closingChar); + + if (ch.HasValue == false) + { + RaiseError(ErrorCode.StringNotTerminated, SR.BatchParser_StringNotTerminated); + } + else + { + Consume(); + } + } + + private void AcceptWhitespace() + { + char? ch; + + do + { + Consume(); + ch = Lookahead(); + } while (ch.HasValue && IsWhitespaceChar(ch.Value)); + + SetToken(LexerTokenType.Whitespace); + } + + private void Consume() + { + currentInput.Consume(); + } + + private void ChangeStateToBatchCommand(Token token) + { + switch (token.TokenType) + { + case LexerTokenType.Setvar: + SetState(RuleSetvar); + break; + case LexerTokenType.Go: + SetTextState(TextRuleFlags.ReportWhitespace | TextRuleFlags.RecognizeLineComment); + break; + case LexerTokenType.Include: + SetTextState(TextRuleFlags.ReportWhitespace | TextRuleFlags.RecognizeDoubleQuotedString); + break; + case LexerTokenType.OnError: + SetTextState(TextRuleFlags.ReportWhitespace | TextRuleFlags.RecognizeLineComment); + break; + default: + SetTextState(TextRuleFlags.ReportWhitespace); + break; + } + } + + private static bool IsDigit(char ch) + { + return ch >= '0' && ch <= '9'; + } + + private static bool IsLetter(char ch) + { + return ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z'; + } + + private bool IsNewLineChar(char ch) + { + return ch == '\r' || ch == '\n'; + } + + private bool IsWhitespaceChar(char ch) + { + return ch == ' ' || ch == '\t'; + } + + private char? Lookahead() + { + return currentInput.Lookahead(); + } + + private char? Lookahead(int lookahead) + { + return currentInput.Lookahead(lookahead); + } + + private bool RuleError() + { + // lexer repeats last error + Parser.RaiseError(errorCode, CurrentToken); + Debug.Fail("Parser.RaiseError should throw an exception"); + return true; + } + + private bool RuleLine() + { + char? ch = Lookahead(); + + if (!ch.HasValue) + { + SetToken(LexerTokenType.Eof); + return true; + } + + switch (ch.Value) + { + case ' ': + case '\t': + AcceptWhitespace(); + return true; + case '\r': + case '\n': + AcceptNewLine(); + return true; + case ':': + if (RecognizeSqlCmdSyntax && TryAcceptBatchCommandAndSetToken()) + { + ChangeStateToBatchCommand(currentToken); + return true; + } + break; + case 'g': + case 'G': + if (TryAccept("go", true)) + { + SetToken(LexerTokenType.Go); + ChangeStateToBatchCommand(currentToken); + return true; + } + break; + } + + SetTextState(TextRuleFlags.RecognizeSingleQuotedString | TextRuleFlags.RecognizeDoubleQuotedString | TextRuleFlags.RecognizeLineComment | TextRuleFlags.RecognizeBlockComment | TextRuleFlags.RecognizeBrace); + return false; + } + + private bool RuleSetvar() + { + char? ch = Lookahead(); + + if (ch.HasValue == false) + { + SetToken(LexerTokenType.Eof); + return true; + } + + switch (ch.Value) + { + case '\r': + case '\n': + AcceptNewLine(); + SetState(RuleLine); + return true; + case ' ': + case '\t': + AcceptWhitespace(); + return true; + default: + if (IsStartIdentifierChar(ch.Value)) + { + AcceptIdentifier(); + SetTextState(TextRuleFlags.ReportWhitespace | TextRuleFlags.RecognizeDoubleQuotedString); + return true; + } + break; + } + + // prepare error token + do + { + Consume(); + ch = Lookahead(); + } while (ch != null && IsWhitespaceChar(ch.Value) == false && IsNewLineChar(ch.Value) == false); + RaiseError(ErrorCode.UnrecognizedToken); + + return true; + } + + private bool RuleText() + { + char? ch = Lookahead(); + + if (ch.HasValue == false) + { + SetToken(LexerTokenType.Eof); + return true; + } + + if (ch.HasValue) + { + if (IsNewLineChar(ch.Value)) + { + AcceptNewLine(); + SetState(RuleLine); + return true; + } + else if (textRuleFlags.HasFlag(TextRuleFlags.ReportWhitespace) && IsWhitespaceChar(ch.Value)) + { + AcceptWhitespace(); + return true; + } + else if (textRuleFlags.HasFlag(TextRuleFlags.RecognizeBlockComment) || textRuleFlags.HasFlag(TextRuleFlags.RecognizeLineComment)) + { + char? ch2 = Lookahead(1); + if (textRuleFlags.HasFlag(TextRuleFlags.RecognizeBlockComment) && ch == '/' && ch2 == '*') + { + AcceptBlockComment(); + return true; + } + else if (textRuleFlags.HasFlag(TextRuleFlags.RecognizeLineComment) && ch == '-' && ch2 == '-') + { + AcceptLineComment(); + return true; + } + } + } + + while (ch.HasValue) + { + bool consumed = false; + switch (ch.Value) + { + case ' ': + case '\t': + if (textRuleFlags.HasFlag(TextRuleFlags.ReportWhitespace)) + { + SetToken(LexerTokenType.Text); + return true; + } + break; + case '\r': + case '\n': + SetToken(LexerTokenType.Text); + return true; + case '"': + if (textRuleFlags.HasFlag(TextRuleFlags.RecognizeDoubleQuotedString)) + { + AcceptQuotedText('"'); + consumed = true; + } + break; + case '\'': + if (textRuleFlags.HasFlag(TextRuleFlags.RecognizeSingleQuotedString)) + { + AcceptEscapableQuotedText('\''); + consumed = true; + } + break; + case '[': + if (textRuleFlags.HasFlag(TextRuleFlags.RecognizeBrace)) + { + AcceptEscapableQuotedText(']'); + consumed = true; + } + break; + case '-': + if (textRuleFlags.HasFlag(TextRuleFlags.RecognizeLineComment)) + { + char? ch2 = Lookahead(1); + if (ch.HasValue && ch2 == '-') + { + SetToken(LexerTokenType.Text); + return true; + } + } + break; + case '/': + if (textRuleFlags.HasFlag(TextRuleFlags.RecognizeBlockComment)) + { + char? ch2 = Lookahead(1); + if (ch.HasValue && ch2 == '*') + { + SetToken(LexerTokenType.Text); + return true; + } + } + break; + default: + break; + } + if (consumed == false) + { + Consume(); + } + ch = Lookahead(); + } + SetToken(LexerTokenType.Text); + return true; + } + + private void RaiseError(ErrorCode code, string message = null) + { + SetState(RuleError); + SetToken(LexerTokenType.Error); + errorCode = code; + Parser.RaiseError(errorCode, CurrentToken, message); + } + + private void SetState(Func lexerFunc) + { + this.lexerFunc = lexerFunc; + } + + internal void SetTextState(TextRuleFlags textRuleFlags) + { + this.textRuleFlags = textRuleFlags; + SetState(RuleText); + } + + private void SetToken(LexerTokenType lexerTokenType) + { + string text = currentInput.FlushBufferedText(); + + currentToken = new Token( + lexerTokenType, + tokenBeginPosition, + new PositionStruct(currentInput.CurrentLine, currentInput.CurrentColumn, currentInput.CurrentOffset, currentInput.Filename), + text, + currentInput.Filename); + } + + private bool TryAccept(string text, bool wordBoundary) + { + Debug.Assert(text.Length > 0); + + int i = 0; + do + { + char? ch = Lookahead(i); + if (ch.HasValue == false || char.ToLowerInvariant(ch.Value) != text[i]) + { + return false; + } + i++; + } while (i < text.Length); + + if (wordBoundary) + { + char? ch = Lookahead(text.Length); + if (ch != null && IsWhitespaceChar(ch.Value) == false && IsNewLineChar(ch.Value) == false + && ch != '$' && ch != '/' && ch != '-' && ch != '\'' && ch != '"' && ch != '(' && ch != '[' && ch != '!') + { + return false; + } + } + + // consume all checked characters + for (i = 0; i < text.Length; i++) + { + Consume(); + } + + return true; + } + + private bool TryAcceptBatchCommandAndSetToken() + { + Consume(); // colon + + if (TryAccept("reset", true)) + { + SetToken(LexerTokenType.Reset); + return true; + } + else if (TryAccept("ed", true)) + { + SetToken(LexerTokenType.Ed); + return true; + } + else if (TryAccept("!!", true)) + { + SetToken(LexerTokenType.Execute); + return true; + } + else if (TryAccept("quit", true)) + { + SetToken(LexerTokenType.Quit); + return true; + } + else if (TryAccept("exit", true)) + { + SetToken(LexerTokenType.Exit); + return true; + } + else if (TryAccept("r", true)) + { + SetToken(LexerTokenType.Include); + return true; + } + else if (TryAccept("serverlist", true)) + { + SetToken(LexerTokenType.Serverlist); + return true; + } + else if (TryAccept("setvar", true)) + { + SetToken(LexerTokenType.Setvar); + return true; + } + else if (TryAccept("list", true)) + { + SetToken(LexerTokenType.List); + return true; + } + else if (TryAccept("error", true)) + { + SetToken(LexerTokenType.ErrorCommand); + return true; + } + else if (TryAccept("out", true)) + { + SetToken(LexerTokenType.Out); + return true; + } + else if (TryAccept("perftrace", true)) + { + SetToken(LexerTokenType.Perftrace); + return true; + } + else if (TryAccept("connect", true)) + { + SetToken(LexerTokenType.Connect); + return true; + } + else if (TryAccept("on error", true)) + { + SetToken(LexerTokenType.OnError); + return true; + } + else if (TryAccept("help", true)) + { + SetToken(LexerTokenType.Help); + return true; + } + else if (TryAccept("xml", true)) + { + SetToken(LexerTokenType.Xml); + return true; + } + else if (TryAccept("listvar", true)) + { + SetToken(LexerTokenType.ListVar); + return true; + } + + return false; + } + internal static bool IsIdentifierChar(char ch) + { + return IsLetter(ch) || IsDigit(ch) || ch == '_' || ch == '-'; + } + + internal static bool IsStartIdentifierChar(char ch) + { + return IsLetter(ch) || ch == '_'; + } + + public bool RecognizeSqlCmdSyntax { get; set; } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LexerInput.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LexerInput.cs new file mode 100644 index 00000000..4d20b5fe --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LexerInput.cs @@ -0,0 +1,186 @@ +// +// 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.IO; +using System.Text; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + /// + /// Lexer input class used by lexer in SMO Batch Parser + /// + internal sealed class LexerInput : IDisposable + { + private readonly string filename; + private TextReader input; + private int currentLine; + private int currentColumn; + private int bufferStartOffset; + private int currentSbOffset; + private StringBuilder buffer; + + /// + /// Constructor method for the LexerInput class + /// + public LexerInput(TextReader reader, string filename) + { + input = reader; + this.filename = filename; + currentLine = 1; + currentColumn = 1; + bufferStartOffset = 0; + currentSbOffset = 0; + buffer = new StringBuilder(); + EnsureBytes(1); + } + + /// + /// Get filename associated with lexer input + /// + public string Filename + { + get { return filename; } + } + + /// + /// Get current line associated with lexer input + /// + public int CurrentLine + { + get { return currentLine; } + } + + /// + /// Get current column associated with lexer input + /// + public int CurrentColumn + { + get { return currentColumn; } + } + + /// + /// Consume token used by lexer input + /// + public void Consume() + { + bool newLineWithCR = false; + + char? ch = Lookahead(); + if (ch == null) + { + // end of stream + return; + } + else if (ch == '\r') + { + newLineWithCR = true; + } + else if (ch == '\n') + { + currentLine++; + currentColumn = 0; + } + + int count = EnsureBytes(1); + if (count == 0) + { + // end of stream + return; + } + currentSbOffset++; + + if (newLineWithCR && Lookahead() != '\n') + { + currentLine++; + currentColumn = 0; + } + currentColumn++; + } + + public void Dispose() + { + if (input != null) + { + input.Dispose(); + input = null; + } + } + + /// + /// Get current offset for the lexer input + /// + public int CurrentOffset + { + get { return bufferStartOffset + currentSbOffset; } + } + + /// + /// Ensure correct number of bytes to buffer + /// + public int EnsureBytes(int bytesToBuffer) + { + if (currentSbOffset + bytesToBuffer > buffer.Length) + { + if (input == null) + { + return buffer.Length - currentSbOffset; + } + int chArrayLength = bytesToBuffer - (buffer.Length - currentSbOffset) + 128; + char[] chArray = new char[chArrayLength]; + int count = input.ReadBlock(chArray, 0, chArrayLength); + buffer.Append(chArray, 0, count); + if (count < chArrayLength) + { + input.Dispose(); + input = null; + } + return buffer.Length - currentSbOffset; + } + return bytesToBuffer; + } + + /// + /// look ahead bytes in lexer input + /// + public char? Lookahead() + { + int count = EnsureBytes(1); + if (count == 0) + { + return null; + } + return buffer[currentSbOffset]; + } + + /// + /// look ahead bytes in lexer input + /// + public char? Lookahead(int lookahead) + { + int count = EnsureBytes(lookahead + 1); + if (count < lookahead + 1) + { + return null; + } + return buffer[currentSbOffset + lookahead]; + } + + /// + /// Flush buffered text in lexer input + /// + public string FlushBufferedText() + { + string text; + + text = buffer.ToString(0, currentSbOffset); + bufferStartOffset += currentSbOffset; + buffer.Remove(0, currentSbOffset); + currentSbOffset = 0; + + return text; + } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LexerTokenType.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LexerTokenType.cs new file mode 100644 index 00000000..77e68dff --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LexerTokenType.cs @@ -0,0 +1,40 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal enum LexerTokenType + { + None, + Text, + TextVerbatim, + Whitespace, + NewLine, + String, + Eof, + Error, + Comment, + + // batch commands + Go, + Reset, + Ed, + Execute, + Quit, + Exit, + Include, + Serverlist, + Setvar, + List, + ErrorCommand, + Out, + Perftrace, + Connect, + OnError, + Help, + Xml, + ListVar, + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LineInfo.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LineInfo.cs new file mode 100644 index 00000000..33984d0c --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/LineInfo.cs @@ -0,0 +1,118 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Collections.Generic; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + /// + /// This class gives information about lines being parsed by + /// the Batch Parser + /// + class LineInfo + { + private IEnumerable tokens; + private IEnumerable variableRefs; + + /// + /// Constructor method for the LineInfo class + /// + public LineInfo(IEnumerable tokens, IEnumerable variableRefs) + { + this.tokens = tokens; + this.variableRefs = variableRefs; + } + + /// + /// Gets the stream position for offset and returns a PositionStruct + /// + public PositionStruct GetStreamPositionForOffset(int offset) + { + if (variableRefs != null) + { + offset = CalculateVarsUnresolvedOffset(offset); + } + int charCount = 0; + Token lastToken = null; + foreach (Token token in tokens) + { + lastToken = token; + if (charCount + token.Text.Length > offset) + { + int line, column; + CalculateLineColumnForOffset(token, offset - charCount, out line, out column); + return new PositionStruct(line, column, token.Begin.Offset + (offset - charCount), token.Filename); + } + charCount += token.Text.Length; + } + if (lastToken != null) + { + return new PositionStruct(lastToken.End.Line, lastToken.End.Column, lastToken.End.Offset, lastToken.Filename); + } + else + { + return new PositionStruct(1, 1, 0, string.Empty); + } + } + + internal static void CalculateLineColumnForOffset(Token token, int offset, out int line, out int column) + { + CalculateLineColumnForOffset(token.Text, offset, 0, token.Begin.Line, token.Begin.Column, out line, out column); + } + + internal static void CalculateLineColumnForOffset(string text, int offset, + int offsetDelta, int lineDelta, int columnDelta, out int line, out int column) + { + line = lineDelta; + column = columnDelta; + int counter = offsetDelta; + while (counter < offset) + { + bool newLineWithCR = false; + + if (text[counter] == '\r') + { + newLineWithCR = true; + } + else if (text[counter] == '\n') + { + line++; + column = 0; + } + counter++; + if (newLineWithCR && counter < text.Length && text[counter] != '\n') + { + line++; + column = 0; + } + column++; + } + } + + private int CalculateVarsUnresolvedOffset(int offset) + { + // find offset of the beginning of variable substitution (if offset points to the middle of it) + int diff = 0; + foreach (VariableReference reference in variableRefs) + { + if (reference.Start >= offset) + { + break; + } + else if (reference.VariableValue != null && offset < reference.Start + reference.VariableValue.Length) + { + offset = reference.Start; + break; + } + if (reference.VariableValue != null) + { + diff += reference.Length - reference.VariableValue.Length; + } + } + return offset + diff; + } + + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/OnErrorAction.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/OnErrorAction.cs new file mode 100644 index 00000000..39d1f6a6 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/OnErrorAction.cs @@ -0,0 +1,13 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal enum OnErrorAction + { + Ignore = 0, + Exit = 1, + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Parser.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Parser.cs new file mode 100644 index 00000000..16f00e58 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Parser.cs @@ -0,0 +1,722 @@ +// +// 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.Diagnostics; +using System.Globalization; +using System.IO; +using System.Security; +using System.Text; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + /// + /// The Parser class on which the Batch Parser is based on + /// + internal sealed class Parser : IDisposable + { + private readonly ICommandHandler commandHandler; + private Lexer lexer; + private List tokenBuffer; + private readonly IVariableResolver variableResolver; + + /// + /// Constructor for the Parser class + /// + public Parser(ICommandHandler commandHandler, IVariableResolver variableResolver, TextReader reader, string name) + { + this.commandHandler = commandHandler; + this.variableResolver = variableResolver; + lexer = new Lexer(reader, name); + tokenBuffer = new List(); + } + + public bool ThrowOnUnresolvedVariable { get; set; } + + private Token LookaheadToken + { + get { return lexer.CurrentToken; } + } + + private LexerTokenType LookaheadTokenType + { + get { return lexer.CurrentTokenType; } + } + + public void Dispose() + { + if (lexer != null) + { + lexer.Dispose(); + lexer = null; + } + } + + private bool AcceptWhitespaceOrComment() + { + bool found = false; + while (LookaheadTokenType == LexerTokenType.Comment || + LookaheadTokenType == LexerTokenType.Whitespace) + { + Accept(); + found = true; + } + return found; + } + + private bool Accept(LexerTokenType lexerTokenType) + { + if (LookaheadTokenType == lexerTokenType) + { + Accept(); + return true; + } + return false; + } + + private void AddTokenToStringBuffer() + { + Token token = LookaheadToken; + + if (token.TokenType != LexerTokenType.Comment) + { + // All variable references must be valid + CheckVariableReferences(token); + } + if (token.TokenType == LexerTokenType.NewLine && token.Text.Length == 0) + { + // Add "virtual" token representing new line that was not in original file + PositionStruct beginPos = token.Begin; + PositionStruct endPos = new PositionStruct(beginPos.Line + 1, 1, beginPos.Offset, beginPos.Filename); + + tokenBuffer.Add(new Token(LexerTokenType.NewLine, beginPos, endPos, Environment.NewLine, beginPos.Filename)); + } + else + { + tokenBuffer.Add(token); + } + } + + private void CheckVariableReferences(Token token) + { + // AddVariableReferences will raise error if reference is not constructed correctly + AddVariableReferences(token, 0, null); + } + + private void AddVariableReferences(Token token, int offset, IList variableRefs) + { + if (lexer.RecognizeSqlCmdSyntax == false) + { + // variables are recognized only in sqlcmd mode. + return; + } + + string text = token.Text; + + int i = 0; + int startIndex = -1; + int state = 0; + while (i < text.Length) + { + char ch = text[i]; + if (state == 0 && ch == '$') + { + state = 1; + } + else if (state == 1) + { + if (ch == '(') + { + state = 2; + } + else if (ch != '$') + { + state = 0; + } + } + else if (state == 2) + { + if (Lexer.IsStartIdentifierChar(ch)) + { + startIndex = i; + state = 3; + } + else + { + RaiseError(ErrorCode.InvalidVariableName, GetSubToken(token, i - 2, i + 1)); + } + } + else if (state == 3) + { + if (ch == ')') + { + if (variableRefs != null) + { + variableRefs.Add(new VariableReference(offset + startIndex - 2, i - startIndex + 3, text.Substring(startIndex, i - startIndex))); + } + state = 0; + } + else if (Lexer.IsIdentifierChar(ch) == false) + { + RaiseError(ErrorCode.InvalidVariableName, GetSubToken(token, startIndex - 2, i + 1)); + } + } + i++; + } + if (state == 2 || state == 3) + { + RaiseError(ErrorCode.InvalidVariableName, GetSubToken(token, startIndex - 2, i)); + } + } + + private static Token GetSubToken(Token token, int startOffset, int endOffset, LexerTokenType? newTokenType = null) + { + LexerTokenType tokenType = newTokenType.HasValue ? newTokenType.Value : token.TokenType; + string text = token.Text.Substring(startOffset, endOffset - startOffset); + string filename = token.Begin.Filename; + PositionStruct beginPos, endPos; + + int beginLine, beginColumn; + LineInfo.CalculateLineColumnForOffset(token, startOffset, out beginLine, out beginColumn); + beginPos = new PositionStruct(beginLine, beginColumn, token.Begin.Offset + startOffset, filename); + + int endLine, endColumn; + LineInfo.CalculateLineColumnForOffset(token, endOffset, out endLine, out endColumn); + endPos = new PositionStruct(endLine, endColumn, token.Begin.Offset + endOffset, filename); + + return new Token(tokenType, beginPos, endPos, text, filename); + } + + private LexerTokenType Accept() + { + lexer.ConsumeToken(); + return LookaheadTokenType; + } + + private void ExecuteBatch(int repeatCount) + { + BatchParserAction action; + action = commandHandler.Go(new TextBlock(this, tokenBuffer), repeatCount); + + if (action == BatchParserAction.Abort) + { + RaiseError(ErrorCode.Aborted); + } + tokenBuffer = new List(); + } + + private bool Expect(LexerTokenType lexerTokenType) + { + if (LookaheadTokenType == lexerTokenType) + return true; + RaiseError(ErrorCode.TokenExpected); + return false; + } + + private bool ExpectAndAccept(LexerTokenType lexerTokenType) + { + if (Accept(lexerTokenType)) + return true; + RaiseError(ErrorCode.TokenExpected); + return false; + } + + internal void Parse() + { + Accept(); + ParseLines(); + } + + private void ParseGo() + { + int repeatCount = 1; + AcceptWhitespaceOrComment(); + if (LookaheadTokenType == LexerTokenType.Text) + { + string text = ResolveVariables(LookaheadToken, 0, null); + for (int i = 0; i < text.Length; i++) + { + if (Char.IsDigit(text[i]) == false) + { + RaiseError(ErrorCode.InvalidNumber); + } + } + bool result = Int32.TryParse(text, out repeatCount); + if (result == false) + { + RaiseError(ErrorCode.InvalidNumber); + } + Accept(LexerTokenType.Text); + AcceptWhitespaceOrComment(); + } + if (LookaheadTokenType != LexerTokenType.Eof) + { + ExpectAndAccept(LexerTokenType.NewLine); + } + ExecuteBatch(repeatCount); + } + + private void ParseInclude() + { + BatchParserAction action; + + Accept(LexerTokenType.Whitespace); + Expect(LexerTokenType.Text); + + Token token = LookaheadToken; + + if (token.Text.StartsWith("--", StringComparison.Ordinal)) + { + RaiseError(ErrorCode.TokenExpected); + } + + lexer.SetTextState(TextRuleFlags.ReportWhitespace | TextRuleFlags.RecognizeLineComment | TextRuleFlags.RecognizeDoubleQuotedString); + Accept(); + AcceptWhitespaceOrComment(); + if (LookaheadTokenType != LexerTokenType.Eof) + { + Expect(LexerTokenType.NewLine); + } + TextReader textReader; + string newFilename; + + string tokenText = token.Text; + IEnumerable tokens; + if (tokenText.IndexOf('"') != -1) + { + tokens = SplitQuotedTextToken(token); + } + else + { + tokens = new[] { token }; + } + + action = commandHandler.Include(new TextBlock(this, tokens), out textReader, out newFilename); + + if (action == BatchParserAction.Abort) + { + RaiseError(ErrorCode.Aborted); + } + if (textReader != null) + { + this.PushInput(textReader, newFilename); + } + } + + private IEnumerable SplitQuotedTextToken(Token token) + { + string tokenText = token.Text; + + if (tokenText.Length <= 1) + { + return new[] { token }; + } + + IList tokens = new List(); + + int offset = 0; + int quotePos = tokenText.IndexOf('"'); + while (quotePos != -1) + { + int closingQuotePos; + if (quotePos != offset) + { + tokens.Add(GetSubToken(token, offset, quotePos)); + offset = quotePos; + } + closingQuotePos = tokenText.IndexOf('"', quotePos + 1); + if (closingQuotePos == -1) + { + // odd number of " characters + break; + } + if (closingQuotePos + 1 < tokenText.Length && tokenText[closingQuotePos + 1] == '"') + { + // two consequtive " characters: report one of them + tokens.Add(GetSubToken(token, quotePos + 1, closingQuotePos + 1, LexerTokenType.TextVerbatim)); + } + else + { + // Add the contents of the quoted string, but remove the " characters + tokens.Add(GetSubToken(token, quotePos + 1, closingQuotePos, LexerTokenType.TextVerbatim)); + } + offset = closingQuotePos + 1; + + quotePos = tokenText.IndexOf('"', offset); + } + if (offset != tokenText.Length) + { + tokens.Add(GetSubToken(token, offset, tokenText.Length)); + } + return tokens; + } + + internal void PushInput(TextReader reader, string filename) + { + lexer.PushInput(reader, filename); + } + + private void ParseLines() + { + do + { + LexerTokenType tokenType = LookaheadTokenType; + switch (tokenType) + { + case LexerTokenType.OnError: + RemoveLastWhitespaceToken(); + Token onErrorToken = LookaheadToken; + Accept(); + ParseOnErrorCommand(onErrorToken); + break; + case LexerTokenType.Eof: + if (tokenBuffer.Count > 0) + { + ExecuteBatch(1); + } + return; + case LexerTokenType.Go: + RemoveLastWhitespaceToken(); + Accept(); + ParseGo(); + break; + case LexerTokenType.Include: + RemoveLastWhitespaceToken(); + Accept(); + ParseInclude(); + break; + case LexerTokenType.Comment: + case LexerTokenType.NewLine: + case LexerTokenType.Text: + case LexerTokenType.Whitespace: + AddTokenToStringBuffer(); + Accept(); + break; + case LexerTokenType.Setvar: + Token setvarToken = LookaheadToken; + RemoveLastWhitespaceToken(); + Accept(); + ParseSetvar(setvarToken); + break; + case LexerTokenType.Connect: + case LexerTokenType.Ed: + case LexerTokenType.ErrorCommand: + case LexerTokenType.Execute: + case LexerTokenType.Exit: + case LexerTokenType.Help: + case LexerTokenType.List: + case LexerTokenType.ListVar: + case LexerTokenType.Out: + case LexerTokenType.Perftrace: + case LexerTokenType.Quit: + case LexerTokenType.Reset: + case LexerTokenType.Serverlist: + case LexerTokenType.Xml: + RaiseError(ErrorCode.UnsupportedCommand, + string.Format(CultureInfo.CurrentCulture, SR.EE_ExecutionError_CommandNotSupported, tokenType)); + break; + default: + RaiseError(ErrorCode.UnrecognizedToken); + break; + } + } while (true); + } + + private void RemoveLastWhitespaceToken() + { + if (tokenBuffer.Count > 0 && tokenBuffer[tokenBuffer.Count - 1].TokenType == LexerTokenType.Whitespace) + { + tokenBuffer.RemoveAt(tokenBuffer.Count - 1); + } + } + + private void ParseOnErrorCommand(Token onErrorToken) + { + ExpectAndAccept(LexerTokenType.Whitespace); + Expect(LexerTokenType.Text); + + string action; + action = ResolveVariables(LookaheadToken, 0, null); + + OnErrorAction onErrorAction; + + if (action.Equals("exit", StringComparison.OrdinalIgnoreCase)) + { + onErrorAction = OnErrorAction.Exit; + } + else if (action.Equals("ignore", StringComparison.OrdinalIgnoreCase)) + { + onErrorAction = OnErrorAction.Ignore; + } + else + { + RaiseError(ErrorCode.UnrecognizedToken); + return; + } + + Accept(LexerTokenType.Text); + AcceptWhitespaceOrComment(); + if (LookaheadTokenType != LexerTokenType.Eof) + { + Expect(LexerTokenType.NewLine); + } + + BatchParserAction parserAction; + + parserAction = commandHandler.OnError(onErrorToken, onErrorAction); + + if (parserAction == BatchParserAction.Abort) + { + RaiseError(ErrorCode.Aborted); + } + } + + private void ParseSetvar(Token setvarToken) + { + string variableName; + string variableValue = null; + Accept(LexerTokenType.Whitespace); + Expect(LexerTokenType.Text); + + variableName = LookaheadToken.Text; + + Accept(); + Accept(LexerTokenType.Whitespace); + + switch (LookaheadTokenType) + { + case LexerTokenType.Text: + // No variable substitution + variableValue = UnquoteVariableValue(LookaheadToken.Text); + lexer.SetTextState(TextRuleFlags.ReportWhitespace | TextRuleFlags.RecognizeLineComment | TextRuleFlags.RecognizeDoubleQuotedString); + Accept(); + AcceptWhitespaceOrComment(); + + if (LookaheadTokenType != LexerTokenType.NewLine && + LookaheadTokenType != LexerTokenType.Eof) + { + RaiseError(ErrorCode.UnrecognizedToken); + } + + if (LookaheadTokenType != LexerTokenType.Eof) + { + Accept(); + } + break; + case LexerTokenType.NewLine: + case LexerTokenType.Eof: + Accept(); + break; + default: + RaiseError(ErrorCode.UnrecognizedToken); + break; + } + + variableResolver.SetVariable(setvarToken.Begin, variableName, variableValue); + } + + internal void RaiseError(ErrorCode errorCode, string message = null) + { + RaiseError(errorCode, LookaheadToken, message); + } + + internal static void RaiseError(ErrorCode errorCode, Token token, string message = null) + { + if (message == null) + { + message = string.Format(CultureInfo.CurrentCulture, SR.BatchParser_IncorrectSyntax, token.Text); + } + throw new BatchParserException(errorCode, token, message); + } + + internal string ResolveVariables(Token inputToken, int offset, List variableRefs) + { + List variableRefsLocal = new List(); + AddVariableReferences(inputToken, offset, variableRefsLocal); + + string inputString = inputToken.Text; + if (variableRefsLocal.Count == 0) + { + // no variable references to substitute + return inputString; + } + + StringBuilder sb = new StringBuilder(); + int lastChar = 0; + PositionStruct? variablePos = null; + foreach (VariableReference reference in variableRefsLocal) + { + int line; + int column; + + if (variablePos != null) + { + LineInfo.CalculateLineColumnForOffset(inputToken.Text, reference.Start - offset, + variablePos.Value.Offset, variablePos.Value.Line, variablePos.Value.Column, + out line, out column); + } + else + { + LineInfo.CalculateLineColumnForOffset(inputToken, reference.Start - offset, out line, out column); + } + + variablePos = new PositionStruct( + line: line, + column: column, + offset: reference.Start - offset, + filename: inputToken.Filename); + string value = variableResolver.GetVariable(variablePos.Value, reference.VariableName); + if (value == null) + { + // Undefined variable + if (ThrowOnUnresolvedVariable == true) + { + RaiseError(ErrorCode.VariableNotDefined, inputToken, + string.Format(CultureInfo.CurrentCulture, SR.BatchParser_VariableNotDefined, reference.VariableName)); + } + continue; + } + + reference.VariableValue = value; + sb.Append(inputToken.Text, lastChar, reference.Start - offset - lastChar); + sb.Append(value); + lastChar = reference.Start - offset + reference.Length; + } + if (lastChar != inputString.Length) + { + sb.Append(inputString, lastChar, inputString.Length - lastChar); + } + if (variableRefs != null) + { + variableRefs.AddRange(variableRefsLocal); + } + return sb.ToString(); + } + + private string UnquoteVariableValue(string s) + { + if (string.IsNullOrEmpty(s) == false) + { + if (s.Length >= 2 && s[0] == '"' && s[s.Length - 1] == s[0]) + { + // all " characters must be doubled + for (int i = 1; i < s.Length - 1; i++) + { + if (s[i] == '"') + { + if (i + 1 >= s.Length - 1 || s[i + 1] != '"') + { + RaiseError(ErrorCode.TokenExpected); + } + // skip next character + i++; + } + } + return s.Substring(1, s.Length - 2).Replace("\"\"", "\""); + } + else if (s[0] == '"' || s[s.Length - 1] == '"') + { + RaiseError(ErrorCode.TokenExpected); + } + else + { + if (s.Length >= 2 && s[0] == '-' && s[1] == '-') + { + return null; + } + if (s.IndexOf('"') >= 0) + { + RaiseError(ErrorCode.TokenExpected); + } + } + } + return s; + } + + public void SetRecognizeSqlCmdSyntax(bool recognizeSqlCmdSyntax) + { + lexer.RecognizeSqlCmdSyntax = recognizeSqlCmdSyntax; + } + + public static TextReader GetBufferedTextReaderForFile(string filename) + { + Exception handledException = null; + try + { + return new StringReader(File.ReadAllText(filename)); + } + catch (IOException exception) + { + handledException = exception; + } + catch (NotSupportedException exception) + { + handledException = exception; + } + catch (UnauthorizedAccessException exception) + { + handledException = exception; + } + catch (SecurityException exception) + { + handledException = exception; + } + + if (null != handledException) + { + throw new Exception(handledException.Message, handledException); + } + + Debug.Fail("This code should not be reached."); + return null; + } + + internal void SetBatchDelimiter(string batchSeparator) + { + // Not implemeneted as only GO is supported now + } + + public static string TokenTypeToCommandString(LexerTokenType lexerTokenType) + { + switch (lexerTokenType) + { + case LexerTokenType.Connect: + return "Connect"; + case LexerTokenType.Ed: + return "Ed"; + case LexerTokenType.ErrorCommand: + return "Error"; + case LexerTokenType.Execute: + return "!!"; + case LexerTokenType.Exit: + return "Exit"; + case LexerTokenType.Help: + return "Help"; + case LexerTokenType.List: + return "List"; + case LexerTokenType.ListVar: + return "ListVar"; + case LexerTokenType.OnError: + return "On Error"; + case LexerTokenType.Out: + return "Out"; + case LexerTokenType.Perftrace: + return "PerfTrace"; + case LexerTokenType.Quit: + return "Quit"; + case LexerTokenType.Reset: + return "Reset"; + case LexerTokenType.Serverlist: + return "ServerList"; + case LexerTokenType.Xml: + return "Xml"; + default: + Debug.Fail("Unknown batch parser command"); + return lexerTokenType.ToString(); + } + } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/PositionStruct.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/PositionStruct.cs new file mode 100644 index 00000000..8f2758f6 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/PositionStruct.cs @@ -0,0 +1,49 @@ +// +// 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.ServiceLayer.BatchParser +{ + [Serializable] + internal struct PositionStruct + { + private readonly int line; + private readonly int column; + private readonly int offset; + private readonly string filename; + + /// + /// Constructor for the PositionStruct class + /// + public PositionStruct(int line, int column, int offset, string filename) + { + this.line = line; + this.column = column; + this.offset = offset; + this.filename = filename; + } + + /// + /// Get line from the PositionStruct + /// + public int Line { get { return line; } } + + /// + /// Get column from the PositionStruct + /// + public int Column { get { return column; } } + + /// + /// Get offset from the PositionStruct + /// + public int Offset { get { return offset; } } + + /// + /// Get file name from the PositionStruct + /// + public string Filename { get { return filename; } } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextBlock.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextBlock.cs new file mode 100644 index 00000000..3b6e2710 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextBlock.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Text; +using System.Collections.Generic; + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal class TextBlock + { + private readonly Parser parser; + private readonly IEnumerable tokens; + + /// + /// Constructor for the TextBlock class + /// + public TextBlock(Parser parser, Token token) : this(parser, new[] { token }) + { + } + + /// + /// Constructor for the TextBlock class + /// + public TextBlock(Parser parser, IEnumerable tokens) + { + this.parser = parser; + this.tokens = tokens; + } + + /// + /// Get text from TextBlock + /// + public void GetText(bool resolveVariables, out string text, out LineInfo lineInfo) + { + StringBuilder sb = new StringBuilder(); + List variableRefs = null; + + if (resolveVariables == false) + { + foreach (Token token in tokens) + { + sb.Append(token.Text); + } + } + else + { + variableRefs = new List(); + foreach (Token token in tokens) + { + if (token.TokenType == LexerTokenType.Text) + { + sb.Append(parser.ResolveVariables(token, sb.Length, variableRefs)); + } + else + { + // comments and whitespaces do not need variable expansion + sb.Append(token.Text); + } + } + } + lineInfo = new LineInfo(tokens, variableRefs); + text = sb.ToString(); + } + + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextRuleFlags.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextRuleFlags.cs new file mode 100644 index 00000000..5b4459a7 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/TextRuleFlags.cs @@ -0,0 +1,20 @@ +// +// 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.ServiceLayer.BatchParser +{ + [Flags] + internal enum TextRuleFlags + { + ReportWhitespace = 1, + RecognizeDoubleQuotedString = 2, + RecognizeSingleQuotedString = 4, + RecognizeLineComment = 8, + RecognizeBlockComment = 16, + RecognizeBrace = 32, + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Token.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Token.cs new file mode 100644 index 00000000..c1d74a18 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/Token.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. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + internal sealed class Token + { + /// + /// Token class used by the lexer in Batch Parser + /// + internal Token(LexerTokenType tokenType, PositionStruct begin, PositionStruct end, string text, string filename) + { + TokenType = tokenType; + Begin = begin; + End = end; + Text = text; + Filename = filename; + } + + /// + /// Get file name associated with Token + /// + public string Filename { get; private set; } + + /// + /// Get beginning position for the Token + /// + public PositionStruct Begin { get; private set; } + + /// + /// Get end position for the Token + /// + public PositionStruct End { get; private set; } + + /// + /// Get text assocaited with the Token + /// + public string Text { get; private set; } + + /// + /// Get token type of the Token + /// + public LexerTokenType TokenType { get; private set; } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/BatchParser/VariableReference.cs b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/VariableReference.cs new file mode 100644 index 00000000..41e13937 --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/BatchParser/VariableReference.cs @@ -0,0 +1,44 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace Microsoft.SqlTools.ServiceLayer.BatchParser +{ + /// + /// Class for reference of variables used by the lexer + /// + internal sealed class VariableReference + { + /// + /// Constructor method for VariableReference class + /// + public VariableReference(int start, int length, string variableName) + { + Start = start; + Length = length; + VariableName = variableName; + VariableValue = null; + } + + /// + /// Get length associated with the VariableReference + /// + public int Length { get; private set; } + + /// + /// Get start position associated with the VariableReference + /// + public int Start { get; private set; } + + /// + /// Get variable name associated with the VariableReference + /// + public string VariableName { get; private set; } + + /// + /// Get variable value associated with the VariableReference + /// + public string VariableValue { get; internal set; } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/LanguageService.cs b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/LanguageService.cs index 232bf217..46a59afb 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/LanguageService.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/LanguageService.cs @@ -1234,9 +1234,9 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices internal void DeletePeekDefinitionScripts() { // Delete temp folder created to store peek definition scripts - if (FileUtils.SafeDirectoryExists(FileUtils.PeekDefinitionTempFolder)) + if (FileUtilities.SafeDirectoryExists(FileUtilities.PeekDefinitionTempFolder)) { - FileUtils.SafeDirectoryDelete(FileUtils.PeekDefinitionTempFolder, true); + FileUtilities.SafeDirectoryDelete(FileUtilities.PeekDefinitionTempFolder, true); } } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/PeekDefinition.cs b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/PeekDefinition.cs index edfcd694..6deeb235 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/PeekDefinition.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/PeekDefinition.cs @@ -58,7 +58,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices { this.serverConnection = serverConnection; this.connectionInfo = connInfo; - this.tempPath = FileUtils.GetPeekDefinitionTempFolder(); + this.tempPath = FileUtilities.GetPeekDefinitionTempFolder(); Initialize(); } diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs index 5c0ebfd2..295e6df9 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. @@ -487,7 +487,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution if (se != null) { var errors = se.Errors.Cast().ToList(); - + // Detect user cancellation errors if (errors.Any(error => error.Class == 11 && error.Number == 0)) { diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/IFileStreamWriter.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/IFileStreamWriter.cs index 9e919dfb..bc3fb3c7 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/IFileStreamWriter.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/IFileStreamWriter.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts; + namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage { /// @@ -16,6 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage { int WriteRow(StorageDataReader dataReader); void WriteRow(IList row, IList columns); + void FlushBuffer(); } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/SaveAsCsvFileStreamFactory.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/SaveAsCsvFileStreamFactory.cs index e52fa260..ebfe173e 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/SaveAsCsvFileStreamFactory.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/SaveAsCsvFileStreamFactory.cs @@ -60,7 +60,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage /// Path to the file to delete public void DisposeFile(string fileName) { - FileUtils.SafeFileDelete(fileName); + FileUtilities.SafeFileDelete(fileName); } } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/SaveAsJsonFileStreamFactory.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/SaveAsJsonFileStreamFactory.cs index 1c652b51..02cde694 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/SaveAsJsonFileStreamFactory.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/SaveAsJsonFileStreamFactory.cs @@ -57,7 +57,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage /// Path to the file to delete public void DisposeFile(string fileName) { - FileUtils.SafeFileDelete(fileName); + FileUtilities.SafeFileDelete(fileName); } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamFactory.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamFactory.cs index ab436851..60b819a6 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamFactory.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamFactory.cs @@ -63,7 +63,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage /// The file to dispose of public void DisposeFile(string fileName) { - FileUtils.SafeFileDelete(fileName); + FileUtilities.SafeFileDelete(fileName); } } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs index c73bd73c..e8bb72cf 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs @@ -324,6 +324,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage { long ticks = BitConverter.ToInt64(buffer, 0); return new DateTime(ticks); + }, null, dt => { // Switch based on the type of column @@ -354,6 +355,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage } return dt.ToString(formatString); + }); } diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamWriter.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamWriter.cs index c8eb536e..e46d1227 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamWriter.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamWriter.cs @@ -232,7 +232,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage internal int WriteNull() { byteBuffer[0] = 0x00; - return FileUtils.WriteWithLength(fileStream, byteBuffer, 1); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 1); } /// @@ -244,7 +244,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage byteBuffer[0] = 0x02; // length shortBuffer[0] = val; Buffer.BlockCopy(shortBuffer, 0, byteBuffer, 1, 2); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 3); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 3); } /// @@ -256,7 +256,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage byteBuffer[0] = 0x04; // length intBuffer[0] = val; Buffer.BlockCopy(intBuffer, 0, byteBuffer, 1, 4); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 5); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 5); } /// @@ -268,7 +268,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage byteBuffer[0] = 0x08; // length longBuffer[0] = val; Buffer.BlockCopy(longBuffer, 0, byteBuffer, 1, 8); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 9); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 9); } /// @@ -280,7 +280,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage byteBuffer[0] = 0x02; // length charBuffer[0] = val; Buffer.BlockCopy(charBuffer, 0, byteBuffer, 1, 2); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 3); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 3); } /// @@ -291,7 +291,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage { byteBuffer[0] = 0x01; // length byteBuffer[1] = (byte) (val ? 0x01 : 0x00); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 2); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 2); } /// @@ -302,7 +302,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage { byteBuffer[0] = 0x01; // length byteBuffer[1] = val; - return FileUtils.WriteWithLength(fileStream, byteBuffer, 2); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 2); } /// @@ -314,7 +314,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage byteBuffer[0] = 0x04; // length floatBuffer[0] = val; Buffer.BlockCopy(floatBuffer, 0, byteBuffer, 1, 4); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 5); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 5); } /// @@ -326,7 +326,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage byteBuffer[0] = 0x08; // length doubleBuffer[0] = val; Buffer.BlockCopy(doubleBuffer, 0, byteBuffer, 1, 8); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 9); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 9); } /// @@ -350,7 +350,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage // data value Buffer.BlockCopy(arrInt32, 0, byteBuffer, 3, iLen - 3); - iTotalLen += FileUtils.WriteWithLength(fileStream, byteBuffer, iLen); + iTotalLen += FileUtilities.WriteWithLength(fileStream, byteBuffer, iLen); return iTotalLen; // len+data } @@ -366,7 +366,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage int iTotalLen = WriteLength(iLen); // length Buffer.BlockCopy(arrInt32, 0, byteBuffer, 0, iLen); - iTotalLen += FileUtils.WriteWithLength(fileStream, byteBuffer, iLen); + iTotalLen += FileUtilities.WriteWithLength(fileStream, byteBuffer, iLen); return iTotalLen; // len+data } @@ -394,7 +394,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage longBufferOffset[0] = dtoVal.Ticks; longBufferOffset[1] = dtoVal.Offset.Ticks; Buffer.BlockCopy(longBufferOffset, 0, byteBuffer, 1, 16); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 17); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 17); } /// @@ -426,7 +426,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage byteBuffer[3] = 0x00; byteBuffer[4] = 0x00; - iTotalLen = FileUtils.WriteWithLength(fileStream, byteBuffer, 5); + iTotalLen = FileUtilities.WriteWithLength(fileStream, byteBuffer, 5); } else { @@ -435,7 +435,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage // convert char array into byte array and write it out iTotalLen = WriteLength(bytes.Length); - iTotalLen += FileUtils.WriteWithLength(fileStream, bytes, bytes.Length); + iTotalLen += FileUtilities.WriteWithLength(fileStream, bytes, bytes.Length); } return iTotalLen; // len+data } @@ -458,12 +458,12 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage byteBuffer[3] = 0x00; byteBuffer[4] = 0x00; - iTotalLen = FileUtils.WriteWithLength(fileStream, byteBuffer, 5); + iTotalLen = FileUtilities.WriteWithLength(fileStream, byteBuffer, 5); } else { iTotalLen = WriteLength(bytesVal.Length); - iTotalLen += FileUtils.WriteWithLength(fileStream, bytesVal, bytesVal.Length); + iTotalLen += FileUtilities.WriteWithLength(fileStream, bytesVal, bytesVal.Length); } return iTotalLen; // len+data } @@ -515,7 +515,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage int iTmp = iLen & 0x000000FF; byteBuffer[0] = Convert.ToByte(iTmp); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 1); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 1); } // The length won't fit in 1 byte, so we need to use 1 byte to signify that the length // is a full 4 bytes. @@ -524,7 +524,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage // convert int32 into array of bytes intBuffer[0] = iLen; Buffer.BlockCopy(intBuffer, 0, byteBuffer, 1, 4); - return FileUtils.WriteWithLength(fileStream, byteBuffer, 5); + return FileUtilities.WriteWithLength(fileStream, byteBuffer, 5); } /// diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs index bc4aa645..702cabb0 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs @@ -8,14 +8,14 @@ using System.Data.SqlClient; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Microsoft.SqlServer.Management.SqlParser.Parser; +using Microsoft.SqlTools.ServiceLayer.BatchParser; using Microsoft.SqlTools.ServiceLayer.Connection; using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection; using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts; using Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage; using Microsoft.SqlTools.ServiceLayer.SqlContext; using Microsoft.SqlTools.ServiceLayer.Utility; -using Microsoft.SqlTools.ServiceLayer.Connection.Contracts; +using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode; using System.Collections.Generic; namespace Microsoft.SqlTools.ServiceLayer.QueryExecution @@ -112,23 +112,20 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution querySettings = settings; streamOutputFactory = outputFactory; - // Process the query into batches - ParseResult parseResult = Parser.Parse(queryText, new ParseOptions - { - BatchSeparator = settings.BatchSeparator - }); - // NOTE: We only want to process batches that have statements (ie, ignore comments and empty lines) - var batchSelection = parseResult.Script.Batches - .Where(batch => batch.Statements.Count > 0) - .Select((batch, index) => - new Batch(batch.Sql, + // Process the query into batches + BatchParserWrapper parser = new BatchParserWrapper(); + List parserResult = parser.GetBatches(queryText); + + var batchSelection = parserResult + .Select((batchDefinition, index) => + new Batch(batchDefinition.BatchText, new SelectionData( - batch.StartLocation.LineNumber - 1, - batch.StartLocation.ColumnNumber - 1, - batch.EndLocation.LineNumber - 1, - batch.EndLocation.ColumnNumber - 1), + batchDefinition.StartLine-1, + batchDefinition.StartColumn-1, + batchDefinition.EndLine-1, + batchDefinition.EndColumn-1), index, outputFactory)); - + Batches = batchSelection.ToArray(); // Create our batch lists diff --git a/src/Microsoft.SqlTools.ServiceLayer/Utility/FileUtils.cs b/src/Microsoft.SqlTools.ServiceLayer/Utility/FileUtils.cs index 75290fd7..3f7aaffe 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Utility/FileUtils.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Utility/FileUtils.cs @@ -6,7 +6,7 @@ using System; using System.IO; namespace Microsoft.SqlTools.ServiceLayer.QueryExecution { - internal static class FileUtils + internal static class FileUtilities { internal static string PeekDefinitionTempFolder = Path.GetTempPath() + "mssql_definition"; internal static bool PeekDefinitionTempFolderCreated = false; @@ -19,9 +19,9 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution try { // create new temp folder - string tempFolder = string.Format("{0}_{1}", FileUtils.PeekDefinitionTempFolder, DateTime.Now.ToString("yyyyMMddHHmmssffff")); + string tempFolder = string.Format("{0}_{1}", FileUtilities.PeekDefinitionTempFolder, DateTime.Now.ToString("yyyyMMddHHmmssffff")); DirectoryInfo tempScriptDirectory = Directory.CreateDirectory(tempFolder); - FileUtils.PeekDefinitionTempFolder = tempScriptDirectory.FullName; + FileUtilities.PeekDefinitionTempFolder = tempScriptDirectory.FullName; tempPath = tempScriptDirectory.FullName; PeekDefinitionTempFolderCreated = true; } @@ -36,7 +36,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution try { // use tempDirectory name created previously - DirectoryInfo tempScriptDirectory = Directory.CreateDirectory(FileUtils.PeekDefinitionTempFolder); + DirectoryInfo tempScriptDirectory = Directory.CreateDirectory(FileUtilities.PeekDefinitionTempFolder); tempPath = tempScriptDirectory.FullName; } catch (Exception) @@ -123,5 +123,21 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution } } + /// + /// Turns off the read-only attribute for this file + /// + /// + + internal static void SetFileReadWrite(string fullFilePath) + { + if (!string.IsNullOrEmpty(fullFilePath) && + File.Exists(fullFilePath)) + { + File.SetAttributes(fullFilePath, FileAttributes.Normal); + } + } } + + + } \ No newline at end of file diff --git a/src/Microsoft.SqlTools.ServiceLayer/project.json b/src/Microsoft.SqlTools.ServiceLayer/project.json index 9cad9751..ab58448a 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/project.json +++ b/src/Microsoft.SqlTools.ServiceLayer/project.json @@ -23,13 +23,14 @@ "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.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", "System.Diagnostics.Process": "4.1.0", - "System.Threading.Thread": "4.0.0" + "System.Threading.Thread": "4.0.0", + "Microsoft.DiaSymReader.Native": "1.4.1" }, "frameworks": { "netcoreapp1.0": { diff --git a/src/Microsoft.SqlTools.ServiceLayer/sr.Designer.cs b/src/Microsoft.SqlTools.ServiceLayer/sr.Designer.cs new file mode 100644 index 00000000..dbf28fba --- /dev/null +++ b/src/Microsoft.SqlTools.ServiceLayer/sr.Designer.cs @@ -0,0 +1,881 @@ +//------------------------------------------------------------------------------ +// +// 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.ServiceLayer { + 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.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 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 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 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.ServiceLayer/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/sr.cs index 2168d490..3bb109f3 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/sr.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/sr.cs @@ -421,6 +421,238 @@ namespace Microsoft.SqlTools.ServiceLayer } } + 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 @@ -680,6 +912,93 @@ namespace Microsoft.SqlTools.ServiceLayer public const string WorkspaceServiceBufferPositionOutOfOrder = "WorkspaceServiceBufferPositionOutOfOrder"; + public const string EE_BatchSqlMessageNoProcedureInfo = "EE_BatchSqlMessageNoProcedureInfo"; + + + public const string EE_BatchSqlMessageWithProcedureInfo = "EE_BatchSqlMessageWithProcedureInfo"; + + + public const string EE_BatchSqlMessageNoLineInfo = "EE_BatchSqlMessageNoLineInfo"; + + + public const string EE_BatchError_Exception = "EE_BatchError_Exception"; + + + public const string EE_BatchExecutionInfo_RowsAffected = "EE_BatchExecutionInfo_RowsAffected"; + + + public const string EE_ExecutionNotYetCompleteError = "EE_ExecutionNotYetCompleteError"; + + + public const string EE_ScriptError_Error = "EE_ScriptError_Error"; + + + public const string EE_ScriptError_ParsingSyntax = "EE_ScriptError_ParsingSyntax"; + + + public const string EE_ScriptError_FatalError = "EE_ScriptError_FatalError"; + + + public const string EE_ExecutionInfo_FinalizingLoop = "EE_ExecutionInfo_FinalizingLoop"; + + + public const string EE_ExecutionInfo_QueryCancelledbyUser = "EE_ExecutionInfo_QueryCancelledbyUser"; + + + public const string EE_BatchExecutionError_Halting = "EE_BatchExecutionError_Halting"; + + + public const string EE_BatchExecutionError_Ignoring = "EE_BatchExecutionError_Ignoring"; + + + public const string EE_ExecutionInfo_InitilizingLoop = "EE_ExecutionInfo_InitilizingLoop"; + + + public const string EE_ExecutionError_CommandNotSupported = "EE_ExecutionError_CommandNotSupported"; + + + public const string EE_ExecutionError_VariableNotFound = "EE_ExecutionError_VariableNotFound"; + + + public const string BatchParserWrapperExecutionEngineError = "BatchParserWrapperExecutionEngineError"; + + + public const string BatchParserWrapperExecutionError = "BatchParserWrapperExecutionError"; + + + public const string BatchParserWrapperExecutionEngineBatchMessage = "BatchParserWrapperExecutionEngineBatchMessage"; + + + public const string BatchParserWrapperExecutionEngineBatchResultSetProcessing = "BatchParserWrapperExecutionEngineBatchResultSetProcessing"; + + + public const string BatchParserWrapperExecutionEngineBatchResultSetFinished = "BatchParserWrapperExecutionEngineBatchResultSetFinished"; + + + public const string BatchParserWrapperExecutionEngineBatchCancelling = "BatchParserWrapperExecutionEngineBatchCancelling"; + + + public const string EE_ScriptError_Warning = "EE_ScriptError_Warning"; + + + public const string TroubleshootingAssistanceMessage = "TroubleshootingAssistanceMessage"; + + + public const string BatchParser_CircularReference = "BatchParser_CircularReference"; + + + public const string BatchParser_CommentNotTerminated = "BatchParser_CommentNotTerminated"; + + + public const string BatchParser_StringNotTerminated = "BatchParser_StringNotTerminated"; + + + public const string BatchParser_IncorrectSyntax = "BatchParser_IncorrectSyntax"; + + + public const string BatchParser_VariableNotDefined = "BatchParser_VariableNotDefined"; + + public const string TestLocalizationConstant = "TestLocalizationConstant"; diff --git a/src/Microsoft.SqlTools.ServiceLayer/sr.resx b/src/Microsoft.SqlTools.ServiceLayer/sr.resx index 3c065e9c..b3fdd780 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/sr.resx +++ b/src/Microsoft.SqlTools.ServiceLayer/sr.resx @@ -373,6 +373,122 @@ . Parameters: 0 - sLine (int), 1 - sCol (int), 2 - eLine (int), 3 - eCol (int) + + Msg {0}, Level {1}, State {2}, Line {3} + + + + Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4} + + + + Msg {0}, Level {1}, State {2} + + + + 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... + + + + You cancelled the query. + + + + An error occurred while the batch was being executed. + + + + An error occurred while the batch was being executed, but the error has been ignored. + + + + Starting execution loop of {0} times... + + + + Command {0} is not supported. + + + + The variable {0} could not be found. + + + + SQL Execution error: {0} + + + + 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 ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1} + + + + Batch parser wrapper execution engine batch ResultSet finished. + + + + Canceling batch parser wrapper batch execution. + + + + Scripting warning. + + + + For more information about this error, see the troubleshooting topics in the product documentation. + + + + File '{0}' recursively included. + + + + Missing end comment mark '*/'. + + + + Unclosed quotation mark after the character string. + + + + Incorrect syntax was encountered while parsing '{0}'. + + + + Variable {0} is not defined. + + EN_LOCALIZATION diff --git a/src/Microsoft.SqlTools.ServiceLayer/sr.strings b/src/Microsoft.SqlTools.ServiceLayer/sr.strings index 14ab937e..6757d0df 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/sr.strings +++ b/src/Microsoft.SqlTools.ServiceLayer/sr.strings @@ -177,8 +177,68 @@ WorkspaceServicePositionColumnOutOfRange(int line) = Position is outside of colu WorkspaceServiceBufferPositionOutOfOrder(int sLine, int sCol, int eLine, int eCol) = Start position ({0}, {1}) must come before or be equal to the end position ({2}, {3}) +############################################################################ +# DacFx Resources + +EE_BatchSqlMessageNoProcedureInfo = Msg {0}, Level {1}, State {2}, Line {3} + +EE_BatchSqlMessageWithProcedureInfo = Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4} + +EE_BatchSqlMessageNoLineInfo = Msg {0}, Level {1}, State {2} + +EE_BatchError_Exception = An error occurred while the batch was being processed. The error message is: {0} + +EE_BatchExecutionInfo_RowsAffected = ({0} row(s) affected) + +EE_ExecutionNotYetCompleteError = The previous execution is not yet complete. + +EE_ScriptError_Error = A scripting error occurred. + +EE_ScriptError_ParsingSyntax = Incorrect syntax was encountered while {0} was being parsed. + +EE_ScriptError_FatalError = A fatal error occurred. + +EE_ExecutionInfo_FinalizingLoop = Execution completed {0} times... + +EE_ExecutionInfo_QueryCancelledbyUser = You cancelled the query. + +EE_BatchExecutionError_Halting = An error occurred while the batch was being executed. + +EE_BatchExecutionError_Ignoring = An error occurred while the batch was being executed, but the error has been ignored. + +EE_ExecutionInfo_InitilizingLoop = Starting execution loop of {0} times... + +EE_ExecutionError_CommandNotSupported = Command {0} is not supported. + +EE_ExecutionError_VariableNotFound = The variable {0} could not be found. + +BatchParserWrapperExecutionEngineError = SQL Execution error: {0} + +BatchParserWrapperExecutionError = Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3} + +BatchParserWrapperExecutionEngineBatchMessage = Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1} + +BatchParserWrapperExecutionEngineBatchResultSetProcessing = Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1} + +BatchParserWrapperExecutionEngineBatchResultSetFinished = Batch parser wrapper execution engine batch ResultSet finished. + +BatchParserWrapperExecutionEngineBatchCancelling = Canceling batch parser wrapper batch execution. + +EE_ScriptError_Warning = Scripting warning. + +TroubleshootingAssistanceMessage = For more information about this error, see the troubleshooting topics in the product documentation. + +BatchParser_CircularReference = File '{0}' recursively included. + +BatchParser_CommentNotTerminated = Missing end comment mark '*/'. + +BatchParser_StringNotTerminated = Unclosed quotation mark after the character string. + +BatchParser_IncorrectSyntax = Incorrect syntax was encountered while parsing '{0}'. + +BatchParser_VariableNotDefined = Variable {0} is not defined. ############################################################################ # Workspace Service -TestLocalizationConstant = EN_LOCALIZATION \ No newline at end of file +TestLocalizationConstant = EN_LOCALIZATION diff --git a/test/CodeCoverage/TS-err-cycle1.txt b/test/CodeCoverage/TS-err-cycle1.txt new file mode 100644 index 00000000..3287cb91 --- /dev/null +++ b/test/CodeCoverage/TS-err-cycle1.txt @@ -0,0 +1,2 @@ +print 'hi' +:r cycle2.txt \ No newline at end of file diff --git a/test/CodeCoverage/cycle2.txt b/test/CodeCoverage/cycle2.txt new file mode 100644 index 00000000..90b51d35 --- /dev/null +++ b/test/CodeCoverage/cycle2.txt @@ -0,0 +1,2 @@ +print '2' +:r TS-err-cycle1.txt \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserMockEventHandler.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserMockEventHandler.cs new file mode 100644 index 00000000..a145ab79 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserMockEventHandler.cs @@ -0,0 +1,52 @@ +// +// 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.Data.SqlClient; +using System.Diagnostics; +using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode; + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser +{ + internal class BatchParserMockEventHandler : IBatchEventsHandler + { + public SqlError Error { get; private set; } + + /// + /// fired when there is an error message from the server + /// + public void OnBatchError(object sender, BatchErrorEventArgs args) + { + Debug.WriteLine("{0}", args.Message); + Error = args.Error; + } + + /// + /// fired when there is a message from the server + /// + public void OnBatchMessage(object sender, BatchMessageEventArgs args) + { + Debug.WriteLine("{0}", args.Message); + } + + /// + /// fired when there is a new result set available. It is guarnteed + /// to be fired from the same thread that called Execute method + /// + public void OnBatchResultSetProcessing(object sender, BatchResultSetEventArgs args) { } + + /// + /// fired when we've done absolutely all actions for the current result set + /// + public void OnBatchResultSetFinished(object sender, EventArgs args) { } + + /// + /// fired when the batch recieved cancel request BEFORE it + /// initiates cancel operation. Note that it is fired from a + /// different thread then the one used to kick off execution + /// + public void OnBatchCancelling(object sender, EventArgs args) { } + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserSqlCmdTests.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserSqlCmdTests.cs new file mode 100644 index 00000000..f83478da --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserSqlCmdTests.cs @@ -0,0 +1,65 @@ +// +// 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.ServiceLayer.BatchParser; +using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode; +using Xunit; + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser +{ + public class BatchParserSqlCmdTests : IDisposable + { + private BatchParserSqlCmd bpcmd; + private PositionStruct testPOS; + public BatchParserSqlCmdTests() + { + bpcmd = new BatchParserSqlCmd(); + testPOS = new PositionStruct(); + bpcmd.SetVariable(testPOS, "variable1", "test1"); + bpcmd.SetVariable(testPOS, "variable2", "test2"); + bpcmd.SetVariable(testPOS, "variable3", "test3"); + } + + public void Dispose() + { + Dispose(true); + } + + private void Dispose(bool disposing) + { + if (disposing) + { + if (bpcmd != null) + { + bpcmd = null; + } + } + } + + [Fact] + public void CheckSetVariable() + { + Assert.Equal(bpcmd.InternalVariables.Count, 3); + bpcmd.SetVariable(testPOS, "variable4", "test4"); + bpcmd.SetVariable(testPOS, "variable5", "test5"); + bpcmd.SetVariable(testPOS, "variable6", "test6"); + Assert.Equal(bpcmd.InternalVariables.Count, 6); + + } + + [Fact] + public void CheckGetVariable() + { + string value = bpcmd.GetVariable(testPOS, "variable1"); + Assert.Equal("test1", value); + value = bpcmd.GetVariable(testPOS, "variable2"); + Assert.Equal("test2", value); + value = bpcmd.GetVariable(testPOS, "variable3"); + Assert.Equal("test3", value); + + } + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserTests.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserTests.cs new file mode 100644 index 00000000..26bef89e --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserTests.cs @@ -0,0 +1,253 @@ +// +// 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.Globalization; +using System.IO; +using System.Text; +using Microsoft.SqlTools.ServiceLayer.BatchParser; +using Microsoft.SqlTools.ServiceLayer.QueryExecution; +using Microsoft.SqlTools.ServiceLayer.Test.Common; +using Microsoft.SqlTools.ServiceLayer.Test.Common.Baselined; +using Xunit; + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser +{ + public class BatchParserTests : BaselinedTest + { + private bool testFailed = false; + + public BatchParserTests() + { + InitializeTest(); + } + + public void InitializeTest() + { + CategoryName = "BatchParser"; + this.TraceOutputDirectory = RunEnvironmentInfo.GetTestDataLocation(); + TestInitialize(); + } + + [Fact] + public void VerifyThrowOnUnresolvedVariable() + { + string script = "print '$(NotDefined)'"; + StringBuilder output = new StringBuilder(); + + TestCommandHandler handler = new TestCommandHandler(output); + IVariableResolver resolver = new TestVariableResolver(new StringBuilder()); + Parser p = new Parser( + handler, + resolver, + new StringReader(script), + "test"); + p.ThrowOnUnresolvedVariable = true; + + handler.SetParser(p); + + Assert.Throws(() => p.Parse()); + } + + public void TokenizeWithLexer(string filename, StringBuilder output) + { + + using (Lexer lexer = new Lexer(new StreamReader(File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read)), filename)) + { + + string inputText = File.ReadAllText(filename); + inputText = inputText.Replace("\r\n", "\n"); + StringBuilder roundtripTextBuilder = new StringBuilder(); + StringBuilder outputBuilder = new StringBuilder(); + StringBuilder tokenizedInput = new StringBuilder(); + bool lexerError = false; + + Token token = null; + try + { + do + { + lexer.ConsumeToken(); + token = lexer.CurrentToken; + roundtripTextBuilder.Append(token.Text); + outputBuilder.AppendLine(GetTokenString(token)); + tokenizedInput.Append('[').Append(GetTokenCode(token.TokenType)).Append(':').Append(token.Text).Append(']'); + } while (token.TokenType != LexerTokenType.Eof); + } + catch (BatchParserException ex) + { + lexerError = true; + outputBuilder.AppendLine(string.Format(CultureInfo.CurrentCulture, "[ERROR: code {0} at {1} - {2} in {3}, message: {4}]", ex.ErrorCode, GetPositionString(ex.Begin), GetPositionString(ex.End), GetFilenameOnly(ex.Begin.Filename), ex.Message)); + } + output.AppendLine("Lexer tokenized input:"); + output.AppendLine("======================"); + output.AppendLine(tokenizedInput.ToString()); + output.AppendLine("Tokens:"); + output.AppendLine("======="); + output.AppendLine(outputBuilder.ToString()); + + if (lexerError == false) + { + // Verify that all text from tokens can be recombined into original string + Assert.Equal(inputText, roundtripTextBuilder.ToString().Replace("\r\n", "\n")); + } + } + } + + private string GetTokenCode(LexerTokenType lexerTokenType) + { + switch (lexerTokenType) + { + case LexerTokenType.Text: + return "T"; + case LexerTokenType.Whitespace: + return "WS"; + case LexerTokenType.NewLine: + return "NL"; + case LexerTokenType.Comment: + return "C"; + default: + return lexerTokenType.ToString(); + } + } + + static void CopyToOutput(string sourceDirectory, string filename) + { + File.Copy(Path.Combine(sourceDirectory, filename), filename, true); + FileUtilities.SetFileReadWrite(filename); + } + + [Fact] + public void BatchParserTest() + { + CopyToOutput(FilesLocation, "TS-err-cycle1.txt"); + CopyToOutput(FilesLocation, "cycle2.txt"); + + Start("err-blockComment"); + Start("err-blockComment2"); + Start("err-varDefinition"); + Start("err-varDefinition2"); + Start("err-varDefinition3"); + Start("err-varDefinition4"); + Start("err-varDefinition5"); + Start("err-varDefinition6"); + Start("err-varDefinition7"); + Start("err-varDefinition8"); + Start("err-varDefinition9"); + Start("err-variableRef"); + Start("err-variableRef2"); + Start("err-variableRef3"); + Start("err-variableRef4"); + Start("err-cycle1"); + Start("input"); + Start("input2"); + Start("pass-blockComment"); + Start("pass-lineComment"); + Start("pass-lineComment2"); + Start("pass-noBlockComments"); + Start("pass-noLineComments"); + Start("pass-varDefinition"); + Start("pass-varDefinition2"); + Start("pass-varDefinition3"); + Start("pass-varDefinition4"); + Start("pass-command-and-comment"); + Assert.False(testFailed, "At least one of test cases failed. Check output for details."); + } + + public void TestParser(string filename, StringBuilder output) + { + try + { + TestCommandHandler commandHandler = new TestCommandHandler(output); + + Parser parser = new Parser( + commandHandler, + new TestVariableResolver(output), + new StreamReader(File.Open(filename, FileMode.Open)), + filename); + + commandHandler.SetParser(parser); + + parser.Parse(); + } + catch (BatchParserException ex) + { + output.AppendLine(string.Format(CultureInfo.CurrentCulture, "[PARSER ERROR: code {0} at {1} - {2} in {3}, token text: {4}, message: {5}]", ex.ErrorCode, GetPositionString(ex.Begin), GetPositionString(ex.End), GetFilenameOnly(ex.Begin.Filename), ex.Text, ex.Message)); + } + } + + private string GetPositionString(PositionStruct pos) + { + return string.Format(CultureInfo.InvariantCulture, "{0}:{1} [{2}]", pos.Line, pos.Column, pos.Offset); + } + + private string GetTokenString(Token token) + { + if (token == null) + { + return "(null)"; + } + else + { + string tokenText = token.Text; + if (tokenText != null) + { + tokenText = tokenText.Replace("\n", "\\n").Replace("\r", "\\r").Replace("\t", "\\t"); + } + string tokenFilename = token.Filename; + tokenFilename = GetFilenameOnly(tokenFilename); + return string.Format(CultureInfo.CurrentCulture, "[Token {0} at {1}({2}:{3} [{4}] - {5}:{6} [{7}]): '{8}']", + token.TokenType, + tokenFilename, + token.Begin.Line, token.Begin.Column, token.Begin.Offset, + token.End.Line, token.End.Column, token.End.Offset, + tokenText); + } + } + + internal static string GetFilenameOnly(string fullPath) + { + return fullPath != null ? Path.GetFileName(fullPath) : null; + } + + public override void Run() + { + string inputFilename = GetTestscriptFilePath(CurrentTestName); + StringBuilder output = new StringBuilder(); + + TokenizeWithLexer(inputFilename, output); + TestParser(inputFilename, output); + + string baselineFilename = GetBaselineFilePath(CurrentTestName); + string baseline; + + try + { + baseline = GetFileContent(baselineFilename); + } + catch (FileNotFoundException) + { + baseline = string.Empty; + } + + string outputString = output.ToString(); + + Console.WriteLine(baselineFilename); + + if (string.Compare(baseline, outputString, StringComparison.Ordinal) != 0) + { + DumpToTrace(CurrentTestName, outputString); + string outputFilename = Path.Combine(TraceFilePath, GetBaselineFileName(CurrentTestName)); + Console.WriteLine(":: Output does not match the baseline!"); + Console.WriteLine("code --diff \"" + baselineFilename + "\" \"" + outputFilename + "\""); + Console.WriteLine(); + Console.WriteLine(":: To update the baseline:"); + Console.WriteLine("copy \"" + outputFilename + "\" \"" + baselineFilename + "\""); + Console.WriteLine(); + testFailed = true; + } + } + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserWrapperTests.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserWrapperTests.cs new file mode 100644 index 00000000..6d73252e --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/BatchParserWrapperTests.cs @@ -0,0 +1,51 @@ +using Microsoft.SqlTools.ServiceLayer.BatchParser; +using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode; +using Xunit; + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser +{ + public class BatchParserWrapperTests + { + private BatchParserWrapper parserWrapper; + public BatchParserWrapperTests() + { + parserWrapper = new BatchParserWrapper(); + } + + [Fact] + public void CheckSimpleSingleSQLBatchStatement() + { + string sqlScript = "select * from sys.objects"; + var batches = parserWrapper.GetBatches(sqlScript); + Assert.Equal(1, batches.Count); + BatchDefinition batch = batches[0]; + Assert.Equal(sqlScript, batch.BatchText); + Assert.Equal(1, batch.StartLine); + Assert.Equal(1, batch.StartColumn); + Assert.Equal(2, batch.EndLine); + Assert.Equal(sqlScript.Length, batch.EndColumn); + } + + [Fact] + public void CheckComment() + { + string sqlScript = "-- this is a comment --"; + var batches = parserWrapper.GetBatches(sqlScript); + Assert.Equal(1, batches.Count); + BatchDefinition batch = batches[0]; + Assert.Equal(sqlScript, batch.BatchText); + Assert.Equal(1, batch.StartLine); + Assert.Equal(1, batch.StartColumn); + Assert.Equal(2, batch.EndLine); + Assert.Equal(sqlScript.Length, batch.EndColumn); + } + + [Fact] + public void CheckNoOps() + { + string sqlScript = "GO"; + var batches = parserWrapper.GetBatches(sqlScript); + Assert.Equal(0, batches.Count); + } + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/TestCommandHandler.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/TestCommandHandler.cs new file mode 100644 index 00000000..9ccdfdc4 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/TestCommandHandler.cs @@ -0,0 +1,92 @@ +// +// 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.IO; +using System.Text; +using System.Globalization; +using Microsoft.SqlTools.ServiceLayer.BatchParser; + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser +{ + internal class TestCommandHandler : ICommandHandler + { + private Parser parser; + private StringBuilder outputString; + + public TestCommandHandler(StringBuilder outputString) + { + this.outputString = outputString; + } + + public void SetParser(Parser parser) + { + this.parser = parser; + } + + public BatchParserAction Go(TextBlock batch, int repeatCount) + { + string textWithVariablesResolved; + string textWithVariablesUnresolved; + LineInfo lineInfoVarsResolved; + LineInfo lineInfoVarsUnresolved; + + batch.GetText(true, out textWithVariablesResolved, out lineInfoVarsResolved); + batch.GetText(false, out textWithVariablesUnresolved, out lineInfoVarsUnresolved); + outputString.AppendFormat(CultureInfo.InvariantCulture, "*** Execute batch ({0})\n", repeatCount); + + if (string.Compare(textWithVariablesUnresolved, textWithVariablesResolved, StringComparison.Ordinal) != 0) + { + outputString.AppendLine("Text with variables not resolved:"); + outputString.AppendLine(textWithVariablesResolved); + outputString.AppendLine("Text with variables not resolved:"); + outputString.AppendLine(textWithVariablesUnresolved); + int i = 0; + outputString.AppendLine("Mapping from resolved string to unresolved:"); + while (i <= textWithVariablesResolved.Length) + { + PositionStruct pos = lineInfoVarsResolved.GetStreamPositionForOffset(i); + string character = i < textWithVariablesResolved.Length ? ("" + textWithVariablesResolved[i]).Replace("\n", @"\n").Replace("\r", @"\r") : "EOF"; + outputString.AppendFormat(CultureInfo.InvariantCulture, "Pos [{0}] {1}:{2} \"{3}\"", + i, + BatchParserTests.GetFilenameOnly(pos.Filename), + pos.Offset, + character); + outputString.AppendLine(); + i++; + } + } + else + { + outputString.AppendLine("Batch text:"); + outputString.AppendLine(textWithVariablesUnresolved); + } + outputString.AppendLine(); + return BatchParserAction.Continue; + } + + public BatchParserAction OnError(Token token, OnErrorAction action) + { + outputString.AppendFormat(CultureInfo.InvariantCulture, "*** PARSER: On error: {0}", action.ToString()); + outputString.AppendLine(); + return BatchParserAction.Continue; + } + + public BatchParserAction Include(TextBlock filename, out TextReader stream, out string newFilename) + { + string resolvedFilename; + LineInfo lineInfo; + + filename.GetText(true, out resolvedFilename, out lineInfo); + outputString.AppendFormat(CultureInfo.InvariantCulture, "*** PARSER: Include file \"{0}\"\n", resolvedFilename); + outputString.AppendLine(); + string currentFilename = lineInfo.GetStreamPositionForOffset(0).Filename; + string currentFilePath = Path.Combine(Path.GetDirectoryName(currentFilename), resolvedFilename); + stream = new StreamReader(File.Open(currentFilePath, FileMode.Open)); + newFilename = resolvedFilename; + return BatchParserAction.Continue; + } + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/TestVariableResolver.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/TestVariableResolver.cs new file mode 100644 index 00000000..ab8c7384 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/BatchParser/TestVariableResolver.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; +using System.Collections.Generic; +using System.Text; +using Microsoft.SqlTools.ServiceLayer.BatchParser; + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.BatchParser +{ + internal sealed class TestVariableResolver : IVariableResolver + { + Dictionary variables = new Dictionary(StringComparer.OrdinalIgnoreCase); + private StringBuilder outputString; + + public TestVariableResolver(StringBuilder outputString) + { + this.outputString = outputString; + } + + public string GetVariable(PositionStruct pos, string name) + { + if (variables.ContainsKey(name)) + { + return variables[name]; + } + else + { + return null; + } + } + + public void SetVariable(PositionStruct pos, string name, string value) + { + outputString.AppendFormat("Setting variable {0} to [{1}]\n", name, value); + if (value == null) + { + variables.Remove(name); + } + else + { + variables[name] = value; + } + } + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/BatchEventHandler.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/BatchEventHandler.cs new file mode 100644 index 00000000..57c24465 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/BatchEventHandler.cs @@ -0,0 +1,123 @@ +// +// 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 Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode; +using System.Data.SqlClient; + + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine +{ + internal class BatchEventHandler: IBatchEventsHandler + { + List resultCounts = new List(); + List sqlMessages = new List(); + List errorMessage = new List(); + int batchfinishedEventCounter = 0; + SqlDataReader dr = null; + bool cancelEventFired = false; + + #region Public properties + public List ResultCounts + { + get + { + return resultCounts; + } + } + + public List SqlMessages + { + get + { + return sqlMessages; + } + } + + public List ErrorMessages + { + get + { + return errorMessage; + } + } + + public int BatchfinishedEventCounter + { + get + { + return batchfinishedEventCounter; + } + } + public bool CancelFired + { + get + { + return cancelEventFired; + } + } + #endregion + + #region IBatchEventHandlers Members + public void OnBatchCancelling(object sender, EventArgs args) + { + Console.WriteLine("\tOnBatchCancelling:"); + cancelEventFired = true; + } + + public void OnBatchError(object sender, BatchErrorEventArgs args) + { + Console.WriteLine("\tOnBatchError:"); + Console.WriteLine("\t\tLine {0} has error: ", args.Line); + Console.WriteLine("\t\tError description: " + args.Description); + Console.WriteLine("\t\tError message: " + args.Message); + Console.WriteLine("\t\tError Line: " + args.TextSpan.iStartLine); + + errorMessage.Add(args.Description); + } + + public void OnBatchMessage(object sender, BatchMessageEventArgs args) + { + Console.WriteLine("\tOnBatchMessage ..."); + Console.WriteLine("\t\tMessage: " + args.Message); + Console.WriteLine("\t\tDetail message:" + args.DetailedMessage); + + if (args.DetailedMessage != "") + { + sqlMessages.Add(args.DetailedMessage); + } + else + { + SqlMessages.Add(null); + } + } + + public void OnBatchResultSetFinished(object sender, EventArgs args) + { + Console.WriteLine("\tOnBatchResultSetFinished..."); + Console.WriteLine("\t\tBatch result set finished"); + batchfinishedEventCounter++; + } + + public void OnBatchResultSetProcessing(object sender, BatchResultSetEventArgs args) + { + lock (this) + { + Console.WriteLine("\tOnBatchResultProcessing..."); + dr = args.DataReader as SqlDataReader; + int count = 0; + while (dr.Read() && !cancelEventFired) + { + count++; + } + Console.WriteLine("\t\tOnBatchResultProcessing: Records returned: " + count); + resultCounts.Add(count); + } + } + + #endregion + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/ExecutionEngineTest.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/ExecutionEngineTest.cs new file mode 100644 index 00000000..d2ea2fdb --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/ExecutionEngineTest.cs @@ -0,0 +1,787 @@ +// +// 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.Data.SqlClient; +using System.Threading; +using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode; +using Microsoft.SqlTools.ServiceLayer.Connection; +using Microsoft.SqlTools.ServiceLayer.Test.Common; +using Microsoft.SqlTools.Test.Utility; +using Xunit; + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine +{ + /// + ///This is a test class for Microsoft.Data.Tools.Schema.Common.ExecutionEngine.ExecutionEngine and is intended + ///to contain all Microsoft.Data.Tools.Schema.Common.ExecutionEngine.ExecutionEngine Unit Tests + /// + + public class ExecutionEngineTest : IDisposable + { + private SqlConnection connection; + private List expResultCounts = new List(); + private List expErrorMessage = new List(); + + #region Test Initialize And Cleanup + + public ExecutionEngineTest() + { + TestInitialize(); + } + + // Initialize the tests + public void TestInitialize() + { + expResultCounts = new List(); + expErrorMessage = new List(); + connection = SetUpConnection("test"); + } + + // helper method to set up a Sql Connection to a database + private SqlConnection SetUpConnection(string name) + { + SqlTestDb testDb = SqlTestDb.CreateNew(TestServerType.OnPrem, false, name); + ConnectionInfo connInfo = TestObjects.InitLiveConnectionInfoForDefinition(testDb.DatabaseName); + string connectionString = ConnectionService.BuildConnectionString(connInfo.ConnectionDetails); + SqlConnection resultConnection = new SqlConnection(connectionString); + resultConnection.Open(); + return resultConnection; + } + + // Helper method to close a connection completely + private void CloseConnection(SqlConnection conn) + { + if (conn != null) + { + conn.Close(); + conn.Dispose(); + } + } + + // + //Use Dispose to close connection after each test has run + // + public void Dispose() + { + CloseConnection(connection); + connection = null; + } + + #endregion + + #region Valid scripts + /// + ///A test for a simple SQL script + /// + [Fact] + public void ExecutionEngineTest_SimpleTest() + { + string sqlStatement = "SELECT * FROM sysobjects"; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(ScriptExecutionResult.Success, executor.ExecutionResult); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + Assert.Equal(1, executor.BatchFinshedEventCounter); + } + + /// + /// Test with a valid script using default execution condition + /// + [Fact] + public void ExecutionEngineTest_DefaultCondition_ValidScript() + { + string sqlStatement = "select * from sysobjects\nGo\n"; + + //Use default execution condition + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, false); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(ScriptExecutionResult.Success, executor.ExecutionResult); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + } + + // + // Test with multiple valid scripts in multiple batches + // + [Fact] + public void ExecutionEngineTest_MultiValidScripts() + { + string sqlStatement = "select * from sys.databases\ngo\nselect name from sys.databases\ngo\nprint 'test'\ngo"; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, false); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(ScriptExecutionResult.Success, executor.ExecutionResult); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + } + + /// + /// Test with SQL comment + /// + [Fact] + public void ExecutionEngineTest_TestComment() + { + string sqlStatement = "/*test comments*/"; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(ScriptExecutionResult.Success, executor.ExecutionResult); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + } + #endregion + + #region Invalid Scripts + /// + /// Test with a invalid query using the default execution condition + /// + [Fact] + public void ExecutionEngineTest_DefaultCondition_InvalidScript() + { + string sqlStatement = "select ** from sysobjects"; + //Use default execution condition + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, false); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal( ScriptExecutionResult.Success | ScriptExecutionResult.Failure, executor.ExecutionResult); + Assert.True(!executor.ParserExecutionError); + Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage)); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + Assert.Equal(0, executor.BatchFinshedEventCounter); + } + + /// + /// Test with an invalid query using a defined execution condition + /// + [Fact] + public void ExecutionEngineTest_InvalidScriptWithCondition() + { + string sqlStatement = "select * from authors"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(executor.ExecutionResult, ScriptExecutionResult.Success | ScriptExecutionResult.Failure); + Assert.True(!executor.ParserExecutionError); + Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage)); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + } + + /// + /// Test with multiple invalid scripts in multiple batches + /// + [Fact] + public void ExecutionEngineTest_MultipleInvalidScript() + { + string sqlStatement = "select ** from products \ngo\n insert into products values (1,'abc')\n go \n"; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(executor.ExecutionResult, ScriptExecutionResult.Success | ScriptExecutionResult.Failure); + Assert.True(!executor.ParserExecutionError); + Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage)); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + } + + /// + /// Test with invalid scripts within a single batch + /// + [Fact] + public void ExecutionEngineTest_MultipleInvalidScript_SingleBatch() + { + string sqlStatement = "select ** from products \n insert into products values (1,'abc')\n go \n"; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(ScriptExecutionResult.Success | ScriptExecutionResult.Failure, executor.ExecutionResult); + Assert.True(!executor.ParserExecutionError); + Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage)); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + } + + /// + /// Test with mixed valid and invalid scripts + /// + [Fact] + public void ExecutionEngineTest_MixedValidandInvalidScript() + { + string sqlStatement = "SELECT * FROM Authors \n Go\n select * from sysobjects \n go\nif exists (select * from sysobjects where id = object_id('MyTab')) DROP TABLE MyTab2"; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(executor.ExecutionResult, ScriptExecutionResult.Success | ScriptExecutionResult.Failure); + Assert.True(!executor.ParserExecutionError); + Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage)); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + } + #endregion + + #region Different execution conditions + /// + /// Test HaltOnError execution condition + /// + [Fact] + public void ExecutionEngineTest_HaltOnError() + { + string sqlStatement = "select * from authors\n go\n select * from sysbojects \n go \n"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = true; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(ScriptExecutionResult.Halted | ScriptExecutionResult.Failure, executor.ExecutionResult); + Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage)); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + Assert.True(executor.ResultCountQueue.Count == 0); + + } + + /// + /// HaltOnError with a single batch + /// + [Fact] + public void ExecutionEngineTest_HaltOnError_OneBatch() + { + string sqlStatement = "select * from authors\n go 30\n"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = true; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(ScriptExecutionResult.Halted | ScriptExecutionResult.Failure, executor.ExecutionResult); + Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage)); + Assert.True(CompareTwoIntLists(executor.ResultCountQueue, expResultCounts)); + Assert.True(executor.ResultCountQueue.Count == 0); + Assert.Equal(0, executor.BatchFinshedEventCounter); + + } + + /// + /// Test ParseOnly execution condition with valid scripts + /// + [Fact] + public void ExecutionEngineTest_ParseOnly_ValidScript() + { + string sqlStatement = "select * from sysobjects"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = true; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + Assert.Equal(ScriptExecutionResult.Success, executor.ExecutionResult); + Assert.True(executor.ResultCountQueue.Count == 0); + Assert.Equal(0, executor.BatchFinshedEventCounter); + } + + /// + /// Test HaltOnError execution condition with invalid scripts + /// + [Fact] + public void ExecutionEngineTest_ParseOnly_InvalidScript() + { + string sqlStatement = "select ** from authors"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = true; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + //Get the expected values + List batchScripts = executor.BatchScripts; + ExecuteSqlBatch(batchScripts, connection); + + Assert.Equal(ScriptExecutionResult.Success | ScriptExecutionResult.Failure, executor.ExecutionResult); + Assert.True(!executor.ParserExecutionError); + Assert.True(executor.ResultCountQueue.Count == 0); + Assert.True(CompareTwoStringLists(executor.ErrorMessageQueue, expErrorMessage)); + } + + /// + /// Parse script only without transaction wrapper + /// + [Fact] + public void ExecutionEngineTest_ParseOnly_ValidScriptWithoutTransaction() + { + string sqlStatement = "select * from sysobjects"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = false; + conditions.IsParseOnly = true; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + Assert.Equal(ScriptExecutionResult.Success, executor.ExecutionResult); + Assert.True(executor.ResultCountQueue.Count == 0); + Assert.Equal(0, executor.BatchFinshedEventCounter); + } + + /// + /// Test with execution timeout value + /// + //TEST_DOESNOTWORK[TestMethod()] + public void ExecutionEngineTest_TimeOut() + { + string sqlStatement = "select * from sysobjects\n go 10\n"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, -1); + executor.Run(); + Assert.Equal(executor.ExecutionResult, ScriptExecutionResult.Success); + + } + + /// + /// Test with invalid connection + /// + [Fact] + public void ExecutionEngineTest_InvalidConnection() + { + string sqlStatement = "select * from sysobjects\n go 100\n"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + connection.Close(); + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions); + executor.Run(); + + // Note: this used to also return Halted at some point in the distant past. + // However since that gets mapped to Failure anyhow, consider "Failure" as acceptable here + Assert.True(executor.ExecutionResult.HasFlag(ScriptExecutionResult.Failure), "Expected failure when invalid connection is present" ); + } + #endregion + + #region SQL Commands + /// + /// Test with SQL commands + /// + [Fact] + public void ExecutionEngineTest_SQLCmds() + { + string[] sqlStatements = { + "select $(INVALIDVAR) from sysobjects", + ":help", + "exit", + "quit", + "!! dir", + "ed", + "reset", + ":list", + ":listvar", + ":serverlist", + ":on error ignore", + ":connect hypothermia -t 300 -U foo -P bar", + ":out $(SystemDrive)\\test.txt", + ":r $(SystemDrive)\\test.txt", + ":error STDOUT", + ":perftrace STDOUT", + "exit (Select count(*) from sysobjects)" + }; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + + foreach (string stmt in sqlStatements) + { + TestExecutor executor = new TestExecutor(stmt, connection, conditions); + executor.Run(); + + //Assert.AreEqual(ScriptExecutionResult.Failure, executor.ExecutionResult); + //Assert.IsTrue(executor.ResultCountQueue.Count == 0); + } + + } + #endregion + + #region Threading + /// + /// Test synchous cancel + /// + [Fact] + public void ExecutionEngineTest_SyncCancel() + { + string sqlStatement = "waitfor delay '0:0:10'"; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, true); + executor.CancelTimeOut = 3000; + executor.Run(); + + Assert.NotNull(executor.ScriptExecuteThread); + Assert.Equal(ScriptExecutionResult.Cancel, executor.ExecutionResult); + Assert.True(executor.CancelEventFired); + + } + + /// + /// Test asynchronous cancel + /// + [Fact] + public void ExecutionEngineTest_ASyncCancel() + { + //string sqlStatement = "--This is a test\nSELECT * FROM sysobjects as t\nGO 50\n use pubsplus \n select * from titles\n go" ; + + string sqlStatement = "waitfor delay '0:0:10'"; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, true); + executor.SyncCancel = false; + executor.Run(); + + Assert.True(executor.CancelEventFired); + Assert.NotNull(executor.ScriptExecuteThread); + if (executor.ScriptExecuteThread != null) + Assert.True(!executor.ScriptExecuteThread.IsAlive); + Assert.Equal(ScriptExecutionResult.Cancel, executor.ExecutionResult); + } + + /// + /// Test sync cancel when the execution is done + /// + /// + /// Disabled test, has race condition where Sql statement will finish + /// before harness has an opportunity to cancel. + //TEST_DOESNOTWORK[TestMethod()] + public void ExecutionEngineTest_SyncCancelAfterExecutionDone() + { + string sqlStatement = "select 1" ; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, true); + executor.Run(); + + Assert.True(!executor.CancelEventFired); + Assert.NotNull(executor.ScriptExecuteThread); + if (executor.ScriptExecuteThread != null) + Assert.True(!executor.ScriptExecuteThread.IsAlive); + Assert.Equal(ScriptExecutionResult.Success | ScriptExecutionResult.Cancel, executor.ExecutionResult); + + } + + /// + /// Test async cancel when the execution is done + /// + [Fact] + public void ExecutionEngineTest_ASyncCancelAfterExecutionDone() + { + string sqlStatement ="select 1"; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + TestExecutor executor = new TestExecutor(sqlStatement, connection, conditions, true); + executor.SyncCancel = false; + executor.Run(); + + Assert.True(!executor.CancelEventFired); + Assert.NotNull(executor.ScriptExecuteThread); + if (executor.ScriptExecuteThread != null) + Assert.True(!executor.ScriptExecuteThread.IsAlive); + Assert.Equal(ScriptExecutionResult.Success | ScriptExecutionResult.Cancel, executor.ExecutionResult); + } + + /// + /// Test multiple threads of execution engine with cancel operation + /// + [Fact] + public void ExecutionEngineTest_MultiThreading_WithCancel() + { + string[] sqlStatement = { "waitfor delay '0:0:10'", + "waitfor delay '0:0:10'", + "waitfor delay '0:0:10'" + }; + + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + conditions.IsTransactionWrapped = true; + conditions.IsParseOnly = false; + conditions.IsHaltOnError = false; + + SqlConnection connection2 = SetUpConnection("test4"); + SqlConnection connection3 = SetUpConnection("test5"); + + TestExecutor executor1 = new TestExecutor(sqlStatement[0], connection, conditions, true); + executor1.CancelTimeOut = 2000; + TestExecutor executor2 = new TestExecutor(sqlStatement[1], connection2, conditions, true); + executor1.CancelTimeOut = 2500; + TestExecutor executor3 = new TestExecutor(sqlStatement[2], connection3, conditions, true); + executor1.CancelTimeOut = 3000; + + Thread t1 = new Thread(new ThreadStart(executor1.Run)); + Thread t2 = new Thread(new ThreadStart(executor2.Run)); + Thread t3 = new Thread(new ThreadStart(executor3.Run)); + + t1.Name = "Executor1"; + t1.Start(); + t2.Name = "Executor2"; + t2.Start(); + t3.Name = "Executor3"; + t3.Start(); + + while ((t1.ThreadState != ThreadState.Stopped) && + (t2.ThreadState != ThreadState.Stopped) && + (t3.ThreadState != ThreadState.Stopped)) + { + Thread.Sleep(1000); + } + + Assert.True(!executor1.ScriptExecuteThread.IsAlive); + Assert.True(!executor2.ScriptExecuteThread.IsAlive); + Assert.True(!executor3.ScriptExecuteThread.IsAlive); + + Assert.True(executor1.CancelEventFired); + Assert.True(executor2.CancelEventFired); + Assert.True(executor3.CancelEventFired); + + CloseConnection(connection2); + CloseConnection(connection3); + } + + #endregion + + #region Private methods + /// + /// Connection to a database + /// + /// Server name + /// DB name + /// + private SqlConnection ConnectToDB(string server, string database) + { + return new SqlConnection(string.Format("Data Source={0};Initial Catalog={1};Integrated Security=True;", server, database)); + } + + /// + /// Execution a script batch + /// + /// A list of SQL queries + /// SQL connection + private void ExecuteSqlBatch(List sqlBatch, SqlConnection connection) + { + foreach (string script in sqlBatch) + { + ExecuteSqlCommand(script, connection); + } + } + + /// + /// Execution one sql command + /// + /// SQL query + /// SQL connection + private void ExecuteSqlCommand(string sqlCmdTxt, SqlConnection connection) + { + SqlCommand cmd = new SqlCommand(sqlCmdTxt, connection); + SqlTransaction transaction = connection.BeginTransaction(); + cmd.Transaction = transaction; + + try + { + using (SqlDataReader dr = cmd.ExecuteReader()) + { + int count = 0; + while (dr.Read()) + { + count++; + } + if (count > 0) + { + expResultCounts.Add(count); + } + } + transaction.Commit(); + } + catch (Exception e) + { + Console.WriteLine("Executing command throws exception: " + e.Message); + expErrorMessage.Add(e.Message); + try + { + transaction.Rollback(); + } + catch (Exception e2) + { + Console.WriteLine("Rollback throws exception"); + Console.WriteLine("Message: " + e2.Message); + } + } + } + + /// + /// Compare two string lists + /// + /// first list + /// second list + /// True if the contents are same, otherwise false + private bool CompareTwoStringLists(List l1, List l2) + { + bool isSame = true; + if(l1.Count != l2.Count) + { + isSame = false; + Console.WriteLine("The count of elements in two lists are not the same"); + return isSame; + } + + for (int i = 0; i < l1.Count; i++) + { + if (l1[i] != l2[i]) + { + isSame = false; + Console.WriteLine("l1: {0}, l2: {1}", l1[i], l2[i]); + break; + } + } + + return isSame; + } + + /// + /// Compare with integer list + /// + /// first list + /// second list + /// True if the two list's contents are same, otherwise false + private bool CompareTwoIntLists(List l1, List l2) + { + bool isSame = true; + if (l1.Count != l2.Count) + { + isSame = false; + Console.WriteLine("The count of elements in two lists are not the same"); + return isSame; + } + + for (int i = 0; i < l1.Count; i++) + { + if (l1[i] != l2[i]) + { + isSame = false; + Console.WriteLine("l1: {0}, l2: {1}", l1[i], l2[i]); + break; + } + } + + return isSame; + } + #endregion + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/TestExecutor.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/TestExecutor.cs new file mode 100644 index 00000000..25eb7f3a --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/TSQLExecutionEngine/TestExecutor.cs @@ -0,0 +1,355 @@ +// +// 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.Data.SqlClient; +using System.Threading; +using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode; +using Microsoft.SqlTools.ServiceLayer.Utility; + +namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.TSQLExecutionEngine +{ + class TestExecutor : IDisposable + { + #region Private variables + string sqlStatement; + ExecutionEngineConditions conditions = new ExecutionEngineConditions(); + BatchEventHandler eventHandler = new BatchEventHandler(); + SqlConnection connection = null; + static Thread _executionThread; + bool _syncCancel = true; + bool _isFinished = false; + bool _cancel = false; + int _cancelTimeout = 500; + int exeTimeOut = 0; + + //For verification + List resultCounts = new List(); + List sqlMessages = new List(); + List errorMessage = new List(); + List batchFinished = new List(); + static ScriptExecutionResult execResult = ScriptExecutionResult.All; + static List batchScripts = new List(); + static Thread exeThread = null; + static bool parserExecutionError = false; + #endregion + + #region private methods + /// + /// Execut the script + /// + /// Execution Engine + /// SQL connection + /// script text + /// Execution condition + /// Batch event handler + /// time out value + static void ExecuteScript(ExecutionEngine exec, SqlConnection connection, string script, ExecutionEngineConditions conditions, IBatchEventsHandler batchHandler, int timeout) + { + Validate.IsNotNull(nameof(exec), exec); + Validate.IsNotNull(nameof(connection), connection); + Validate.IsNotNullOrEmptyString(nameof(script), script); + Validate.IsNotNull(nameof(conditions), conditions); + + Console.WriteLine("------------------------ Executing Script ----------------------"); + + //exec.BeginScriptExecution(script, connection, timeout, conditions, batchConsumer); + ScriptExecutionArgs args = new ScriptExecutionArgs(script, connection, timeout, conditions, batchHandler); + //exec.ExecuteScript(args); + + _executionThread = new Thread(new ParameterizedThreadStart(exec.ExecuteScript)); + _executionThread.Start(args); + } + + /// + /// Cancel the execution + /// + /// Execution Engine + /// Cancel the execution synchronously or not + /// sycn canceo timeout + static void Cancel(ExecutionEngine exec, bool isSynchronous, int millisecondsTimeOut) + { + //exec.BeginCancellingExecution(isSynchronous, timeout); + + if (_executionThread == null || + _executionThread.ThreadState == System.Threading.ThreadState.Unstarted || + _executionThread.ThreadState == System.Threading.ThreadState.Stopped) + { + exec.Close(isSynchronous, /* isDiscard */ false, /* isFinishExecution */ true); + } + else + { + // activates the cancel thread + Thread cancelThread = new Thread(new ThreadStart(exec.CancelCurrentBatch)); + cancelThread.Name = "Cancelling thread"; + cancelThread.Start(); + + // in a syncrhonous call, we need to block and wait until the thread is stopped + if (isSynchronous) + { + int totalSleep = 0; + while (totalSleep < millisecondsTimeOut && _executionThread != null && _executionThread.IsAlive) + { + Thread.Sleep(50); + totalSleep += 50; + } + + if (_executionThread != null && _executionThread.IsAlive) + { + exec.Close(isSynchronous, /* isDiscard */ true); + } + else + { + exec.Close(/* isCloseConnection */ true); + } + } + } + Thread.Sleep(5000); + } + #endregion + + #region Public properties + public bool SyncCancel + { + get + { + return _syncCancel; + } + set + { + _syncCancel = value; + } + } + + public int CancelTimeOut + { + get + { + return _cancelTimeout; + } + set + { + _cancelTimeout = value; + } + } + + public ScriptExecutionResult ExecutionResult + { + get + { + return execResult; + } + } + + public List ResultCountQueue + { + get + { + return resultCounts; + } + } + + public List SQLMessageQueue + { + get + { + return sqlMessages; + } + } + + public List ErrorMessageQueue + { + get + { + return errorMessage; + } + } + + public List BatchScripts + { + get + { + return batchScripts; + } + } + + public int BatchFinshedEventCounter + { + get + { + return eventHandler.BatchfinishedEventCounter; + } + } + + public Thread ScriptExecuteThread + { + get + { + return exeThread; + } + } + + public bool CancelEventFired + { + get + { + return eventHandler.CancelFired; + } + } + + public bool ParserExecutionError + { + get + { + return parserExecutionError; + } + } + #endregion + + #region Constructors + public TestExecutor(string batch, SqlConnection conn, ExecutionEngineConditions exeCondition): this(batch, conn, exeCondition, false) + { + } + + public TestExecutor(string batch, SqlConnection conn, ExecutionEngineConditions exeCondition, bool cancelExecution) + { + sqlStatement = batch; + conditions.IsHaltOnError = exeCondition.IsHaltOnError; + conditions.IsParseOnly = exeCondition.IsParseOnly; + conditions.IsTransactionWrapped = exeCondition.IsTransactionWrapped; + + _cancel = cancelExecution; + connection = conn; + + //Initialize the static variables + execResult = ScriptExecutionResult.All; + batchScripts = new List(); + exeThread = null; + parserExecutionError = false; + + } + public TestExecutor(string batch, SqlConnection conn, ExecutionEngineConditions exeCondition, int timeOut) + : this(batch, conn, exeCondition, false) + { + exeTimeOut = timeOut; + } + #endregion + + #region public methods + /// + /// Execute the test engine + /// + public void Run() + { + Console.WriteLine("Executing scripts {0} ...", sqlStatement); + + using (ExecutionEngine exec = new ExecutionEngine()) + { + _isFinished = false; + exec.BatchParserExecutionStart += new EventHandler(OnBatchParserExecutionStart); + exec.BatchParserExecutionFinished += new EventHandler(OnBatchParserExecutionFinished); + exec.BatchParserExecutionError += new EventHandler(OnBatchParserExecutionError); + exec.ScriptExecutionFinished += new EventHandler(OnExecutionFinished); + + ExecuteScript(exec, connection, sqlStatement, conditions, eventHandler, exeTimeOut); + + if (!_cancel) + { + //Do not cancel the execution engine + while (!_isFinished) + { + Thread.Sleep(1000); + } + } + else + { + if (!_isFinished) + { + Console.WriteLine("Need to cancel while the batch execution is not finished!"); + Thread.Sleep(1000); + } + else + { + Console.WriteLine("Canceling after the exe engine is disposed..."); + } + Cancel(exec, _syncCancel, _cancelTimeout); + } + } + } + #endregion + + #region ParserEvent + /// + /// Called when batch is called + /// + /// + /// + static void OnBatchParserExecutionStart(object sender, BatchParserExecutionStartEventArgs e) + { + Console.WriteLine("****************"); + Console.WriteLine(e.Batch.Text); + batchScripts.Add(e.Batch.Text); + Console.WriteLine("****************"); + + Console.WriteLine("ON_BATCH_PARSER_EXECUTION_START : Start executing batch... " + e.Batch + " at line " + e.TextSpan.iStartLine); + exeThread = Thread.CurrentThread; + } + + /// + /// Called when batch is done + /// + /// + /// + static void OnBatchParserExecutionFinished(object sender, BatchParserExecutionFinishedEventArgs e) + { + Console.WriteLine("ON_BATCH_PARSER_EXECUTION_FINISHED : Done executing batch \n\t{0}\n\t with result... {1} ", e.Batch.Text, e.ExecutionResult); + if (execResult == ScriptExecutionResult.All) + execResult = e.ExecutionResult; + else + execResult = execResult | e.ExecutionResult; + } + + /// + /// Called when batch pasing found a warning/error + /// + /// + /// + static void OnBatchParserExecutionError(object sender, BatchParserExecutionErrorEventArgs e) + { + Console.WriteLine("ON_BATCH_PARSER_EXECUTION_ERROR : {0} found... at line {1}: {2}", e.MessageType.ToString(), e.Line.ToString(), e.Message); + Console.WriteLine("\t Error Description: " + e.Description); + parserExecutionError = true; + + } + + /// + /// Called when script is done + /// + /// + /// + private void OnExecutionFinished(object sender, ScriptExecutionFinishedEventArgs e) + { + Console.WriteLine("ON_EXECUTION_FINISHED : Script execution done with result ..." + e.ExecutionResult); + _isFinished = true; + + if (execResult == ScriptExecutionResult.All) + execResult = e.ExecutionResult; + else + execResult = execResult|e.ExecutionResult; + + resultCounts = eventHandler.ResultCounts; + sqlMessages = eventHandler.SqlMessages; + errorMessage = eventHandler.ErrorMessages; + } + #endregion + + #region IDisposable Members + public void Dispose() + { + } + #endregion + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Baselined/BaselinedTest.cs b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Baselined/BaselinedTest.cs new file mode 100644 index 00000000..f358488a --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Baselined/BaselinedTest.cs @@ -0,0 +1,454 @@ +// +// 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.Diagnostics; +using System.IO; +using System.Text; +using Xunit; + +namespace Microsoft.SqlTools.ServiceLayer.Test.Common.Baselined +{ + /// + /// This class serves as the base class for all baselined tests + /// It will provide easy services for you to interact with your test files and their baselines + /// + public abstract class BaselinedTest + { + /// + /// Holds the extension for the TestScripts + /// + private string _testScriptExtension; + + /// + /// Holds the extensionf or the Baseline files + /// + private string _baselineExtension; + + /// + /// Holds the path to the base location of both TestScripts and Baselines + /// + private string _testCategoryName; + + /// + /// Holds the ROOT Dir for trace output + /// + private string _traceOutputDir; + + /// + /// Holds the prefix for the baseline + /// + private string _baselinePrefix; + + /// + /// Holds the prefix for the Testscript + /// + private string _testscriptPrefix; + + /// + /// Holds the name of the current test + /// + private string _currentTestname; + + private string _baselineSubDir = string.Empty; + + public const string TestScriptDirectory = @"Testscripts\"; + public const string BaselineDirectory = @"Baselines\"; + + /// + /// Gets/Sets the extension for the Testscript files + /// + public string TestscriptFileExtension + { + get + { + return _testScriptExtension; + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentException("TestscriptFileExtension needs a value"); + _testScriptExtension = value; + } + } + + /// + /// Gets/Sets the extension for the Baseline files + /// + public string BaselineFileExtension + { + get + { + return _baselineExtension; + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentException("BaselineFileExtension needs a value"); + _baselineExtension = value; + } + } + + /// + /// Gets/Sets the path to the base location of both test scripts and baseline files + /// + /// + /// Just use the SubDir name + /// TestScripts should be in FileBaseLocation\Testscripts; and Baselines should be in FileBaseLocation\Baselines + /// The value of this will be appended to ROOT_DIR (QA\SrcUTest\Common) + /// + public string CategoryName + { + get + { + return _testCategoryName; + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentException("FileBaseLocation needs a value"); + _testCategoryName = value; + } + } + + /// + /// Gets/Sets the output base directory for trace output (null = no trace output) + /// + public string TraceOutputDirectory + { + get + { + return _traceOutputDir; + } + set + { + _traceOutputDir = value; + } + } + + /// + /// Gets the full path of where the files will be pulled from + /// + public string FilesLocation + { + get + { + return Path.Combine(RunEnvironmentInfo.GetTestDataLocation(), CategoryName, TestScriptDirectory); + } + } + + /// + /// Gets or Sets the sub directory in Baselines where the exected baseline results are located + /// + public string BaselinesSubdir + { + get + { + if (this._baselineSubDir == null) + this._baselineSubDir = string.Empty; + return this._baselineSubDir; + } + set { this._baselineSubDir = value; } + } + + /// + /// Gets the full path of where the baseline files will be pulled from + /// + public string BaselineFilePath + { + get + { + return Path.Combine(RunEnvironmentInfo.GetTestDataLocation(), CategoryName, Path.Combine( BaselineDirectory, BaselinesSubdir )); + } + } + + /// + /// Gets the full path of where the Trace will output + /// + public string TraceFilePath + { + get + { + return Path.Combine(Path.GetFullPath(TraceOutputDirectory), this.CategoryName, this.BaselinesSubdir); + } + } + + /// + /// Gets/Sets the prefix used for baseline files + /// + public string BaselinePrefix + { + get + { + return _baselinePrefix; + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentException("BaselinePrefix needs a value"); + _baselinePrefix = value; + } + } + + /// + /// Gets/Sets the prefix used for testscript files + /// + public string TestscriptPrefix + { + get + { + return _testscriptPrefix; + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentException("TestscriptPrefix needs a value"); + _testscriptPrefix = value; + } + } + + /// + /// Gets/Sets the name of the current test + /// + public string CurrentTestName + { + get + { + return _currentTestname; + } + } + + /// + /// Constructor + /// + public BaselinedTest() + { + Initialize(); + } + + /// + /// Initializes the class + /// + private void Initialize() + { + _testScriptExtension = _baselineExtension = "txt"; //default to txt + _testCategoryName = null; + string projectPath = Environment.GetEnvironmentVariable(Constants.ProjectPath); + if (projectPath != null) + { + _traceOutputDir = Path.Combine(projectPath, "trace"); + } + else + { + _traceOutputDir = Environment.ExpandEnvironmentVariables(@"%SystemDrive%\trace\"); + } + _baselinePrefix = "BL"; + _testscriptPrefix = "TS"; + } + + /// + /// This method should be called whenever you do a [TestInitialize] + /// + public virtual void TestInitialize() + { + + if (string.IsNullOrEmpty(_testCategoryName)) + throw new ArgumentException("Set CategoryName to the name of the directory containing your Testscripts and Baseline files"); + + if (!Directory.Exists(FilesLocation)) + throw new FileNotFoundException(string.Format("Path to Testscripts ([{0}]) does not exist.", FilesLocation)); + if (!Directory.Exists(BaselineFilePath)) + throw new FileNotFoundException(string.Format("Path to Baseline Files [{0}] does not exist.", BaselineFilePath)); + if (!string.IsNullOrEmpty(TraceFilePath) && !Directory.Exists(TraceFilePath)) //if this does not exist, then we want it (pronto) + Directory.CreateDirectory(TraceFilePath); + + } + + /// + /// Compares two strings and gives appropriate output + /// + /// Actual string + /// Expected string + /// Fails test if strings do not match; comparison is done using an InvariantCulture StringComparer + public void CompareActualWithBaseline(string actualContent, string baselineContent) + { + + int _compareResult = string.Compare(actualContent, baselineContent, StringComparison.OrdinalIgnoreCase); + if (_compareResult != 0) + { + Trace.WriteLine("Debug Info:"); + Trace.WriteLine("========BEGIN=EXPECTED========"); + Trace.WriteLine(baselineContent); + Trace.WriteLine("=========END=EXPECTED========="); + Trace.WriteLine("=========BEGIN=ACTUAL========="); + Trace.WriteLine(actualContent); + Trace.WriteLine("==========END=ACTUAL=========="); + Assert.True(false, string.Format("Comparison failed! (actualContent {0} baselineContent)", (_compareResult < 0 ? "<" : ">"))); //we already know it is not equal + } + else + { + Trace.WriteLine("Compare match! All is fine..."); + } + } + + /// + /// Gets the name of the testscript with the provided name + /// + /// Name of the test + /// the path to the baseline file + /// Asserts that file exists + public string GetTestscriptFilePath(string name) + { + string retVal = Path.Combine(FilesLocation, string.Format("{0}-{1}.{2}", TestscriptPrefix, name, TestscriptFileExtension)); + Assert.True(File.Exists(retVal), string.Format("TestScript [{0}] does not exist", retVal)); + return retVal; + } + + /// + /// Gets the name of the test script with the provided name and the provided index + /// + /// Name of the test + /// File index + /// the path to the baseline file + /// Asserts that file exists + public string GetTestscriptFilePath(string name, int index) + { + string retVal = Path.Combine(FilesLocation, string.Format("{0}-{1}{2}.{3}", TestscriptPrefix, name, index.ToString(), TestscriptFileExtension)); + Assert.True(File.Exists(retVal), string.Format("TestScript [{0}] does not exist", retVal)); + return retVal; + } + + /// + /// Gets the formatted baseline file name + /// + /// Name of the test + public string GetBaselineFileName(string name) + { + return string.Format("{0}-{1}.{2}", BaselinePrefix, name, BaselineFileExtension); + } + + /// + /// Gets the file path to the baseline file for the named case + /// + /// Name of the test + /// the path to the baseline file + /// Asserts that file exists + public string GetBaselineFilePath(string name, bool assertIfNotFound) + { + string retVal = Path.Combine(BaselineFilePath, GetBaselineFileName(name)); + + if (assertIfNotFound) + { + Assert.True(File.Exists(retVal), string.Format("Baseline [{0}] does not exist", retVal)); + } + return retVal; + } + + public string GetBaselineFilePath(string name) + { + return GetBaselineFilePath(name, true); + } + + /// + /// Gets the contents of a file + /// + /// Path of the file to read + /// The contents of the file + public string GetFileContent(string path) + { + Trace.WriteLine(string.Format("GetFileContent for [{0}]", Path.GetFullPath(path))); + + using (StreamReader sr = new StreamReader(File.Open(path, FileMode.Open), Encoding.Unicode)) + { + return sr.ReadToEnd(); + } + } + + /// + /// Dumps the text to a Trace file + /// + /// Test name used to create file name + /// Text to dump to the trace file + /// Overwrites whatever is already in the file (if anything) + public string DumpToTrace(string testName, string text) + { + if (string.IsNullOrEmpty(TraceFilePath)) + { + return string.Empty; //nothing to do + } + + string traceFile = Path.Combine(TraceFilePath, GetBaselineFileName(testName)); + + if (File.Exists(traceFile)) + { + Trace.Write(string.Format("Overwriting existing trace file [{0}]", traceFile)); + File.Delete(traceFile); + } + else + { + Trace.Write(string.Format("Dumping to trace file [{0}]", traceFile)); + } + + if (Directory.Exists(TraceFilePath) == false) + { + Directory.CreateDirectory(TraceFilePath); + } + WriteTraceFile(traceFile, text); + return traceFile; + } + + /// + /// Writes the context to the trace file + /// + /// The file name for the trace output + /// The content for the trace file + public void WriteTraceFile(string traceFile, string text) + { + Stream traceStream = GetStreamFromString(traceFile); + using (StreamWriter sw = new StreamWriter(traceStream, Encoding.Unicode)) + { + sw.Write(text); + sw.Flush(); + sw.Dispose(); + } + } + + /// + /// Converts a string to a stream + /// + /// + /// + private Stream GetStreamFromString(string s) + { + MemoryStream stream = new MemoryStream(); + StreamWriter writer = new StreamWriter(stream); + writer.Write(s); + writer.Flush(); + stream.Position = 0; + return stream; + } + + /// + /// Starts the actual running of the test after nicely initializing + /// + /// Name of the test + public void Start(string testname) + { + Trace.WriteLine(string.Format("Starting test named [{0}]", testname)); + _currentTestname = testname; + + Run(); + + Trace.WriteLine("Test Completed"); + } + + /// + /// Runs the actual test + /// + /// Override this method to put in your test logic + public abstract void Run(); + + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Baselined/BaselinedTestWithMultipleScripts.cs b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Baselined/BaselinedTestWithMultipleScripts.cs new file mode 100644 index 00000000..2d58131c --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Baselined/BaselinedTestWithMultipleScripts.cs @@ -0,0 +1,93 @@ +// +// 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.ServiceLayer.Test.Common.Baselined +{ + public abstract class BaselinedTestWithMultipleScripts : BaselinedTest + { + /// + /// Holds the number of files that are associated with this test + /// + private int _fileCount; + + /// + /// Gets or Sets the amount of scripts to process + /// + public int FileCount + { + get + { + return _fileCount; + } + set + { + if (value < 1) + throw new ArgumentOutOfRangeException("FileCount", value, "FileCount must be > 0"); + _fileCount = value; + } + } + + /// + /// Constructor + /// + public BaselinedTestWithMultipleScripts() + : base() + { + //set invalid value + _fileCount = 0; + } + + /// + /// Runs the test + /// + public override void Run() + { + //little self-assigning sanity check there (if invalid value, it will throw) + FileCount = FileCount; + + //process all files + for (int n = 0; n < FileCount; n++) + { + ProcessFile(GetTestscriptFilePath(this.CurrentTestName, n)); + } + + PostProcessFiles(); + + Verify(); + } + + /// + /// Starts a test with the specified fileCount + /// + /// Name of the test + /// Number of files + public void Start(string name, int fileCount) + { + FileCount = fileCount; + base.Start(name); + } + + /// + /// This method gives you an opportunity to handle one specific file + /// + /// Path to the current file + public abstract void ProcessFile(string filePath); + + /// + /// This method gives you an opportunity to perform any actions after files are processed + /// + public virtual void PostProcessFiles() + { + } + + /// + /// This method will be called when all files have been processed; add verification logic here + /// + public abstract void Verify(); + + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Constants.cs b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Constants.cs index 968c9d05..809821db 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Constants.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Constants.cs @@ -8,5 +8,27 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common public static class Constants { public const string SqlConectionSettingsEnvironmentVariable = "SettingsFileName"; + + /// + /// Environment variable used to get the TSDATA source directory root. + /// K2 is under it. + /// + public const string SourceDirectoryEnvVariable = "Enlistment_Root"; + + /// + /// Environment variable used to get the build output directory. + /// DTRun will set this automatically + /// + public const string BinariesDirectoryEnvVariable = "DacFxBuildOutputDir"; + + public const string DDSuiteBuiltTarget = "DD_SuitesTarget"; + + public const string DBBackupFileLocation = "DBBackupPath"; + + public const string ProjectPath = "ProjectPath"; + + public const string BVTLocalRoot = "BVT_LOCALROOT"; + + public const string DBIMode = "DBI_MODE"; } } diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/RunEnvironmentInfo.cs b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/RunEnvironmentInfo.cs new file mode 100644 index 00000000..7f0b753b --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/RunEnvironmentInfo.cs @@ -0,0 +1,57 @@ +// +// 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.IO; +using System.Reflection; + +namespace Microsoft.SqlTools.ServiceLayer.Test.Common +{ + public class RunEnvironmentInfo + { + private static string cachedTestFolderPath; + + public static bool IsLabMode() + { + string bvtLabRoot = Environment.GetEnvironmentVariable(Constants.BVTLocalRoot); + if (string.IsNullOrEmpty(bvtLabRoot)) + { + return false; + } + return true; + } + + /// + /// Location of all test data (baselines, etc). + /// + /// The full path to the test data directory + public static string GetTestDataLocation() + { + string testFolderPath; + string testPath = @"test\Microsoft.SqlTools.ServiceLayer.Test.Common\TestData"; + string projectPath = Environment.GetEnvironmentVariable(Constants.ProjectPath); + + if (projectPath != null) + { + testFolderPath = Path.Combine(projectPath, testPath); + } + else + { + if (cachedTestFolderPath != null) + { + testFolderPath = cachedTestFolderPath; + } + else + { + string defaultPath = Path.Combine(typeof(Scripts).GetTypeInfo().Assembly.Location, @"..\..\..\..\.."); + testFolderPath = Path.Combine(defaultPath, @"Microsoft.SqlTools.ServiceLayer.Test.Common\TestData"); + cachedTestFolderPath = testFolderPath; + } + } + return testFolderPath; + } + + } +} diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/SqlTestDb.cs b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/SqlTestDb.cs index 6b831814..99d3df96 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/SqlTestDb.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/SqlTestDb.cs @@ -5,6 +5,9 @@ using System; using System.Globalization; +using Microsoft.SqlTools.ServiceLayer.Connection; +using Microsoft.SqlTools.ServiceLayer.Connection.Contracts; +using Xunit; namespace Microsoft.SqlTools.ServiceLayer.Test.Common { @@ -80,6 +83,33 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common } } + /// + /// Returns connection info after making a connection to the database + /// + /// + /// + /// + /// + public ConnectionInfo InitLiveConnectionInfo(TestServerType serverType, string databaseName, string scriptFilePath) + { + ConnectParams connectParams = TestConnectionProfileService.Instance.GetConnectionParameters(serverType, databaseName); + + string ownerUri = scriptFilePath; + var connectionService = ConnectionService.Instance; + var connectionResult = connectionService.Connect(new ConnectParams() + { + OwnerUri = ownerUri, + Connection = connectParams.Connection + }); + + connectionResult.Wait(); + + ConnectionInfo connInfo = null; + connectionService.TryFindConnection(ownerUri, out connInfo); + Assert.NotNull(connInfo); + return connInfo; + } + public void Dispose() { Cleanup(); diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestConnectionProfileService.cs b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestConnectionProfileService.cs index 7f0ffc2e..7a18ab7d 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestConnectionProfileService.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestConnectionProfileService.cs @@ -92,9 +92,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common InstanceInfo instanceInfo = GetInstance(key); if (instanceInfo != null) { - ConnectParams connenctParam = CreateConnectParams(instanceInfo, key, databaseName); + ConnectParams connectParam = CreateConnectParams(instanceInfo, key, databaseName); - return connenctParam; + return connectParam; } return null; } diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-blockComment.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-blockComment.txt new file mode 100644 index 00000000..5f18e60c Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-blockComment.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-blockComment2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-blockComment2.txt new file mode 100644 index 00000000..9ea67865 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-blockComment2.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-cycle1.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-cycle1.txt new file mode 100644 index 00000000..99ccebc2 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-cycle1.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition.txt new file mode 100644 index 00000000..366ee9cb Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition2.txt new file mode 100644 index 00000000..d528a7a4 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition2.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition3.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition3.txt new file mode 100644 index 00000000..af42b18f Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition3.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition4.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition4.txt new file mode 100644 index 00000000..6525f508 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition4.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition5.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition5.txt new file mode 100644 index 00000000..bda188ad Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition5.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition6.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition6.txt new file mode 100644 index 00000000..47a16c60 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition6.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition7.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition7.txt new file mode 100644 index 00000000..2b90818b Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition7.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition8.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition8.txt new file mode 100644 index 00000000..26d9035a Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition8.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition9.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition9.txt new file mode 100644 index 00000000..2d122500 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-varDefinition9.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef.txt new file mode 100644 index 00000000..8699187c Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef2.txt new file mode 100644 index 00000000..fd242565 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef2.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef3.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef3.txt new file mode 100644 index 00000000..53d8180f Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef3.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef4.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef4.txt new file mode 100644 index 00000000..99e4ac12 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-err-variableRef4.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-input.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-input.txt new file mode 100644 index 00000000..c5d6a3fb Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-input.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-input2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-input2.txt new file mode 100644 index 00000000..c36560e5 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-input2.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-blockComment.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-blockComment.txt new file mode 100644 index 00000000..107771e5 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-blockComment.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-command-and-comment.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-command-and-comment.txt new file mode 100644 index 00000000..96eb3904 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-command-and-comment.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-lineComment.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-lineComment.txt new file mode 100644 index 00000000..3c48e618 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-lineComment.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-lineComment2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-lineComment2.txt new file mode 100644 index 00000000..08b2fb91 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-lineComment2.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-noBlockComments.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-noBlockComments.txt new file mode 100644 index 00000000..24d436f6 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-noBlockComments.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-noLineComments.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-noLineComments.txt new file mode 100644 index 00000000..c9b21fef Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-noLineComments.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition.txt new file mode 100644 index 00000000..0738badb Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition2.txt new file mode 100644 index 00000000..4e8dd825 Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition2.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition3.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition3.txt new file mode 100644 index 00000000..a59b0d0c Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition3.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition4.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition4.txt new file mode 100644 index 00000000..c6d63cdf Binary files /dev/null and b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/Baselines/BL-pass-varDefinition4.txt differ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-blockComment.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-blockComment.txt new file mode 100644 index 00000000..53be760f --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-blockComment.txt @@ -0,0 +1 @@ +/* unterminated block comment * \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-blockComment2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-blockComment2.txt new file mode 100644 index 00000000..8eab1675 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-blockComment2.txt @@ -0,0 +1 @@ +/* unterminated block comment \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-cycle1.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-cycle1.txt new file mode 100644 index 00000000..3287cb91 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-cycle1.txt @@ -0,0 +1,2 @@ +print 'hi' +:r cycle2.txt \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition.txt new file mode 100644 index 00000000..be2b390f --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition.txt @@ -0,0 +1,2 @@ +:setvar 0var +-- invalid variable name \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition2.txt new file mode 100644 index 00000000..38c13997 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition2.txt @@ -0,0 +1,2 @@ +:setvar a b c +-- invalid syntax (too many params) diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition3.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition3.txt new file mode 100644 index 00000000..046a4c4d --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition3.txt @@ -0,0 +1,2 @@ +-- no variable defined (at EOF) +:setvar \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition4.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition4.txt new file mode 100644 index 00000000..2888f4ef --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition4.txt @@ -0,0 +1,2 @@ +:setvar +-- no variable defined diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition5.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition5.txt new file mode 100644 index 00000000..a1fa6817 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition5.txt @@ -0,0 +1 @@ +:setvar a "unterminated string \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition6.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition6.txt new file mode 100644 index 00000000..9760b4ef --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition6.txt @@ -0,0 +1 @@ +:setvar a "b"c"d" diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition7.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition7.txt new file mode 100644 index 00000000..9465ef43 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition7.txt @@ -0,0 +1 @@ +:setvar a b"c"d diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition8.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition8.txt new file mode 100644 index 00000000..52eae7c1 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition8.txt @@ -0,0 +1 @@ +:setvar a b"" diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition9.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition9.txt new file mode 100644 index 00000000..983ff555 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-varDefinition9.txt @@ -0,0 +1 @@ +:setvar a ""b diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef.txt new file mode 100644 index 00000000..d5cd6995 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef.txt @@ -0,0 +1 @@ +Variable reference with no name: $() diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef2.txt new file mode 100644 index 00000000..91d4156e --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef2.txt @@ -0,0 +1 @@ +Variable reference with invalid name: $(7var) diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef3.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef3.txt new file mode 100644 index 00000000..a5348340 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef3.txt @@ -0,0 +1,2 @@ +Unterminated variable reference: $(var +iable) diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef4.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef4.txt new file mode 100644 index 00000000..be964d50 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-err-variableRef4.txt @@ -0,0 +1 @@ +Unterminated variable reference (at EOF): $(var \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-input.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-input.txt new file mode 100644 index 00000000..3f2bacc7 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-input.txt @@ -0,0 +1,24 @@ +GO 2 +BEGIN +:r input-2.txt +:r "input-2.txt" +:setvar ABC "My Value" +MIDDLE +#$(ABC)# + :setvar ABC "NNNNNNNNNNNNNNNNN" +END +GO + :setvar ABC +:setvar B "value of B" +:setvar A "Long value with 'fake' variable ref: $(B)" +~$(ABC)~$~$$(A)~ +GO +:setvar _var_1-1 VALUE +select [1] from x +GO 2 +:on error ignore +:on error exit -- comment +select 1 +/ * fake comment */ +- - fake comment +:setv \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-input2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-input2.txt new file mode 100644 index 00000000..27fe230c --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-input2.txt @@ -0,0 +1,70 @@ +/* Lexer tests */ +:setvar a "df df"" +" +ABC +:r +:r input2.txt + :r +:setvar +:setvar +:setvariable asd +GOTO +:on errors +:on error exit +:on error ignore +DEF + +go +go +abc--def + select '$$' '$$(s)asd)' werwer$$(Y)ss +:Setvar x y +:Setvar Y "VALUE OF Y" + from x + GO 2 + :SETVAR Z "WE" +:include x +This is a comment: /* +:SETVAR w e +" +*/ +Select 1 +go 3 +:on error exit +go + select 2Y==>$(Y) + A==>$(a)<== +:setvar x "y" +:setvar z "z" +select $(x_y) + from DUAL + + -- on error commands + :on error exit + :on error ignore + :on error $(variable) + :on error invalid value + + -- Line comment + /* Multi line + block comment +-- with nested line comment */ + +/*** block comment 2 ***/ +select '/*', '*/' + +-- Unsupported commands +:reset +:ed +:!! +:quit +:exit +:serverlist +:list +:error errorfile.txt +:out stdout +:perftrace perftrace.txt +:connect server\instance +:help +:xml on +:listvar diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-blockComment.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-blockComment.txt new file mode 100644 index 00000000..4e83b607 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-blockComment.txt @@ -0,0 +1,6 @@ +/**//***//* *//** */ */ +one comment: /*/*/ */*/ +not a comment: / */ +/* block comment */ +/* block +comment */ \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-command-and-comment.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-command-and-comment.txt new file mode 100644 index 00000000..fb39b022 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-command-and-comment.txt @@ -0,0 +1,16 @@ +print 1 +GO--comment1 +GO --comment2 +GO 1--comment3 +:setvar a -- +:setvar b c--notcomment +:setvar d e --comment +:setvar f /*notcomment*/ +:setvar g h--notcomment --comment +:setvar j k--notcomment--notcomment +:setvar a-- b-- +:r input-2.txt --comment +-- next line will error in parser +:r --comment.txt +:on error exit--comment +:on error exit --comment diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-lineComment.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-lineComment.txt new file mode 100644 index 00000000..9856afdf --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-lineComment.txt @@ -0,0 +1,5 @@ +-- Line comment +a--b also a comment + -- comment + --comment +-- comment -- comment diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-lineComment2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-lineComment2.txt new file mode 100644 index 00000000..c9d07354 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-lineComment2.txt @@ -0,0 +1,2 @@ +-- +-- \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-noBlockComments.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-noBlockComments.txt new file mode 100644 index 00000000..17896f5c --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-noBlockComments.txt @@ -0,0 +1,3 @@ +/ * */ +-- /* +-- */ diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-noLineComments.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-noLineComments.txt new file mode 100644 index 00000000..7d5ef326 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-noLineComments.txt @@ -0,0 +1,4 @@ +/* +-- not a line comment +*/ +- - not a comment diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition.txt new file mode 100644 index 00000000..a946a086 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition.txt @@ -0,0 +1,2 @@ +:setvar a "variable with +new line" \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition2.txt new file mode 100644 index 00000000..48bff249 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition2.txt @@ -0,0 +1,2 @@ +:setvar a [unterminated_brace +$(b)] diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition3.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition3.txt new file mode 100644 index 00000000..09ac2c3e --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition3.txt @@ -0,0 +1 @@ +:setvar a "b""c""d" diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition4.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition4.txt new file mode 100644 index 00000000..89e5fbf4 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/TS-pass-varDefinition4.txt @@ -0,0 +1,6 @@ +:setvar a "" +:setvar a +:setvar a """" +/* double-quote followed by new line: */ +:setvar a """ +" \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/cycle2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/cycle2.txt new file mode 100644 index 00000000..90b51d35 --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/cycle2.txt @@ -0,0 +1,2 @@ +print '2' +:r TS-err-cycle1.txt \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/input-2.txt b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/input-2.txt new file mode 100644 index 00000000..82198eaf --- /dev/null +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/TestData/BatchParser/TestScripts/input-2.txt @@ -0,0 +1 @@ +select 1 diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/LanguageServer/PeekDefinitionTests.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/LanguageServer/PeekDefinitionTests.cs index e75948b9..d751b57c 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/LanguageServer/PeekDefinitionTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/LanguageServer/PeekDefinitionTests.cs @@ -203,9 +203,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices { PeekDefinition peekDefinition = new PeekDefinition(null, null); var languageService = LanguageService.Instance; - Assert.True(Directory.Exists(ServiceLayer.QueryExecution.FileUtils.PeekDefinitionTempFolder)); + Assert.True(Directory.Exists(FileUtilities.PeekDefinitionTempFolder)); languageService.DeletePeekDefinitionScripts(); - Assert.False(Directory.Exists(ServiceLayer.QueryExecution.FileUtils.PeekDefinitionTempFolder)); + Assert.False(Directory.Exists(FileUtilities.PeekDefinitionTempFolder)); } /// @@ -216,8 +216,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices { var languageService = LanguageService.Instance; PeekDefinition peekDefinition = new PeekDefinition(null, null); - ServiceLayer.QueryExecution.FileUtils.SafeDirectoryDelete(ServiceLayer.QueryExecution.FileUtils.PeekDefinitionTempFolder, true); - Assert.False(Directory.Exists(ServiceLayer.QueryExecution.FileUtils.PeekDefinitionTempFolder)); + FileUtilities.SafeDirectoryDelete(FileUtilities.PeekDefinitionTempFolder, true); + Assert.False(Directory.Exists(FileUtilities.PeekDefinitionTempFolder)); // Expected not to throw any exception languageService.DeletePeekDefinitionScripts(); } diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/DataStorage/ServiceBufferFileStreamReaderWriterTests.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/DataStorage/ServiceBufferFileStreamReaderWriterTests.cs index 150e6281..d7c2e9b3 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/DataStorage/ServiceBufferFileStreamReaderWriterTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/DataStorage/ServiceBufferFileStreamReaderWriterTests.cs @@ -354,6 +354,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution.DataStorage // Make sure the display value has a time string with 7 milliseconds Assert.True(Regex.IsMatch(displayValue, @"^[\d]{4}-[\d]{2}-[\d]{2} [\d]{2}:[\d]{2}:[\d]{2}\.[\d]{7}$")); + } } @@ -493,4 +494,4 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution.DataStorage } } } -} +} \ No newline at end of file diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/QueryTests.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/QueryTests.cs index fad77f8f..1f69fd0b 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/QueryTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/QueryTests.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Castle.Components.DictionaryAdapter; using Microsoft.SqlTools.ServiceLayer.Connection; using Microsoft.SqlTools.ServiceLayer.QueryExecution; using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts; @@ -136,20 +135,16 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution.Execution // If: // ... I Then execute the query query.Execute(); - query.ExecutionTask.Wait(); // Then: // ... There should be no batches - Assert.Empty(query.Batches); + Assert.Equal(1, query.Batches.Length); - // ... The query should have completed successfully with no batch summaries returned - Assert.True(query.HasExecuted); - Assert.Empty(query.BatchSummaries); + // ... The query shouldn't have completed successfully + Assert.False(query.HasExecuted); - // ... The message callback should have been called exactly once - // ... The message must not have a batch associated with it - Assert.Equal(1, messages.Count); - Assert.Null(messages[0].BatchId); + // ... The message callback should have been called 0 times + Assert.Equal(0, messages.Count); } [Fact] @@ -215,26 +210,23 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution.Execution // .. I then execute the query query.Execute(); - query.ExecutionTask.Wait(); // Then: - // ... I should get back a query with one batch (no op batch is not included) + // ... I should get back a query with two batches Assert.NotEmpty(query.Batches); - Assert.Equal(1, query.Batches.Length); + Assert.Equal(2, query.Batches.Length); - // ... The query should have completed successfully with one batch summary returned - Assert.True(query.HasExecuted); - Assert.NotEmpty(query.BatchSummaries); - Assert.Equal(1, query.BatchSummaries.Length); + //// ... The query shouldn't have completed successfully unless all batches were executed + Assert.False(query.HasExecuted); - // ... The batch callbacks should have been called precisely 1 time - Assert.Equal(1, batchStartCallbacksReceived); - Assert.Equal(1, batchCompletionCallbacksReceived); - Assert.Equal(1, batchMessageCallbacksReceived); + //// ... The batch callbacks should have been called 0 times + Assert.Equal(0, batchStartCallbacksReceived); + Assert.Equal(0, batchCompletionCallbacksReceived); + Assert.Equal(0, batchMessageCallbacksReceived); } [Fact] - public async Task QueryExecuteMultipleNoOpBatches() + public void QueryExecuteMultipleNoOpBatches() { // Setup: // ... Keep track of how many messages were sent @@ -253,20 +245,16 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution.Execution // .. I then execute the query query.Execute(); - await query.ExecutionTask; // Then: // ... I should get back a query with no batches - Assert.Empty(query.Batches); + Assert.Equal(2, query.Batches.Length); - // ... The query should have completed successfully with one zero batch summaries returned - Assert.True(query.HasExecuted); - Assert.Empty(query.BatchSummaries); + // ... The query shouldn't have completed successfully + Assert.False(query.HasExecuted); // ... The message callback should have been called exactly once - // ... The message must not have a batch associated with it - Assert.Equal(1, messages.Count); - Assert.Null(messages[0].BatchId); + Assert.Equal(0, messages.Count); } [Fact] diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/ServiceIntegrationTests.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/ServiceIntegrationTests.cs index c6b5721b..6eee53f0 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/ServiceIntegrationTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/ServiceIntegrationTests.cs @@ -17,6 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution.Execution { public class ServiceIntegrationTests { + #region Get SQL Tests [Fact] @@ -183,35 +184,6 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution.Execution // NOTE: In order to limit test duplication, we're running the ExecuteDocumentSelection // version of execute query. The code paths are almost identical. - [Fact] - private async Task QueryExecuteAllBatchesNoOp() - { - // If: - // ... I request to execute a valid query with all batches as no op - var workspaceService = GetDefaultWorkspaceService(string.Format("{0}\r\nGO\r\n{0}", Common.NoOpQuery)); - var queryService = Common.GetPrimedExecutionService(null, true, false, workspaceService); - var queryParams = new ExecuteDocumentSelectionParams { QuerySelection = Common.WholeDocument, OwnerUri = Common.OwnerUri}; - - var efv = new EventFlowValidator() - .AddStandardQueryResultValidator() - .AddStandardMessageValidator() - .AddEventValidation(QueryCompleteEvent.Type, p => - { - // Validate OwnerURI matches - Assert.Equal(Common.OwnerUri, p.OwnerUri); - Assert.NotNull(p.BatchSummaries); - Assert.Equal(0, p.BatchSummaries.Length); - }).Complete(); - await Common.AwaitExecution(queryService, queryParams, efv.Object); - - // Then: - // ... All events should have been called as per their flow validator - efv.Validate(); - - // ... There should be one active query - Assert.Equal(1, queryService.ActiveQueries.Count); - } - [Fact] public async Task QueryExecuteSingleBatchNoResultsTest() { diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/Utility/TestDbColumn.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/Utility/TestDbColumn.cs index 0d916f75..cbe6d189 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/Utility/TestDbColumn.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/Utility/TestDbColumn.cs @@ -29,5 +29,6 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Utility { base.NumericScale = scale; } + } } diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/Utility/TestObjects.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/Utility/TestObjects.cs index c8419bc4..82b1f9c0 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/Utility/TestObjects.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/Utility/TestObjects.cs @@ -11,15 +11,12 @@ using System.Data.SqlClient; using System.Globalization; using System.IO; using System.Reflection; -using System.Threading.Tasks; using Microsoft.SqlServer.Management.Common; using Microsoft.SqlTools.ServiceLayer.Connection; using Microsoft.SqlTools.ServiceLayer.Connection.Contracts; using Microsoft.SqlTools.ServiceLayer.LanguageServices; -using Microsoft.SqlTools.ServiceLayer.SqlContext; using Microsoft.SqlTools.ServiceLayer.Test.Common; using Microsoft.SqlTools.ServiceLayer.Test.Utility; -using Microsoft.SqlTools.ServiceLayer.Workspace; using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts; using Xunit; diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/project.json b/test/Microsoft.SqlTools.ServiceLayer.Test/project.json index 2541b443..8aa02e30 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/project.json +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/project.json @@ -2,7 +2,8 @@ "name": "Microsoft.SqlTools.ServiceLayer.Test", "version": "1.0.0-*", "buildOptions": { - "debugType": "portable" + "debugType": "portable", + "define": [] }, "configurations": { "Integration": { diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs index 5781ccf6..637c064c 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs @@ -58,7 +58,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Driver if (!File.Exists(serviceHostExecutable)) { throw new FileNotFoundException($"Failed to find Microsoft.SqlTools.ServiceLayer.exe at provided location '{serviceHostExecutable}'. " + - "Please set SQLTOOLSERVICE_EXE environment variable to location of exe"); + "Please set SQLTOOLSSERVICE_EXE environment variable to location of exe"); } //setup the service host for code coverage if the envvar is enabled