Update to .NET 7 SDK (#1792)

This commit is contained in:
Cheena Malhotra
2023-02-07 17:53:36 -08:00
committed by GitHub
parent 51892519ef
commit 8d119876d9
62 changed files with 169 additions and 147 deletions

View File

@@ -112,7 +112,7 @@ namespace Microsoft.SqlTools.Extensibility
if (!services.ContainsKey(typeof(T)))
{
ExtensionStore store = new ExtensionStore(typeof(T), config);
base.Register<T>(() => store.GetExports<T>());
base.Register<T>(store.GetExports<T>);
}
}
@@ -136,11 +136,11 @@ namespace Microsoft.SqlTools.Extensibility
// If the service type is already registered, replace the existing registration with the new one
if (this.services.ContainsKey(typeof(T)))
{
this.services[typeof(T)] = () => store.GetExports<T>();
this.services[typeof(T)] = store.GetExports<T>;
}
else
{
base.Register<T>(() => store.GetExports<T>());
base.Register<T>(store.GetExports<T>);
}
}

View File

@@ -119,10 +119,10 @@ namespace Microsoft.SqlTools.Hosting.Protocol
}
}
public void WaitForExit()
public async Task WaitForExitAsync()
{
this.endpointExitedTask = new TaskCompletionSource<bool>();
this.endpointExitedTask.Task.Wait();
await this.endpointExitedTask.Task.WaitAsync(CancellationToken.None);
}
public async Task Stop()

View File

@@ -1,5 +1,5 @@
// WARNING:
// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0
// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0
// from information in sr.strings
// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN
//

View File

@@ -23,10 +23,7 @@ namespace Microsoft.SqlTools.Utility
{
foreach (var key in keys)
{
if (_cache.ContainsKey(key))
{
_cache.Remove(key);
}
_cache.Remove(key);
}
}
}, out exception);

View File

@@ -19,6 +19,7 @@ namespace Microsoft.SqlTools.Utility
public T GetOptionValue<T>(string name, T defaultValue = default(T))
{
#pragma warning disable CA1854
T result = defaultValue;
if (Options != null && Options.ContainsKey(name))
{
@@ -34,6 +35,7 @@ namespace Microsoft.SqlTools.Utility
"Cannot convert option value {0}:{1} to {2}", name, value ?? "", typeof(T)));
}
}
#pragma warning restore CA1854
return result;
}