mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Update to .NET 7 SDK (#1792)
This commit is contained in:
@@ -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>);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user