Skip to content

Commit

Permalink
Resolve remaing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Apr 10, 2024
1 parent 1c176a4 commit 798ac4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,11 @@ internal static IPAddress[] GetDnsIpAddresses(string serverName, TimeoutTimer ti
args0: serverName,
args1: remainingTimeout);
using CancellationTokenSource cts = new CancellationTokenSource(remainingTimeout);
// using this overload to support netstandard
//TODO Refactor?
Task<IPAddress[]> task = Dns.GetHostAddressesAsync(serverName);
task.ConfigureAwait(false);
task.Wait(cts.Token);
return task.Result;

return Dns.GetHostAddressesAsync(serverName, cts.Token)
.ConfigureAwait(false)
.GetAwaiter()
.GetResult();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,6 @@ internal static string GetLocalDBInstance(string dataSource, out bool error)
string instanceName = null;
ReadOnlySpan<char> input = dataSource.AsSpan().TrimStart();
error = false;
// NetStandard 2.0 does not support passing a string to ReadOnlySpan<char>
//TODO Refactor?
int index = input.IndexOf(LocalDbHost.AsSpan().Trim(), StringComparison.InvariantCultureIgnoreCase);
if (input.StartsWith(LocalDbHost_NP.AsSpan().Trim(), StringComparison.InvariantCultureIgnoreCase))
{
Expand Down

0 comments on commit 798ac4e

Please sign in to comment.