Upgrade solution to .NET 6.0.9 (Build with .NET SDK v6.0.401) (#1692)

This commit is contained in:
Cheena Malhotra
2022-09-16 11:27:52 -07:00
committed by GitHub
parent 676819f669
commit 006ac60923
74 changed files with 143 additions and 414 deletions

View File

@@ -236,10 +236,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Messaging
private byte[] GetMessageBytes(string messageString, Encoding encoding = null)
{
if (encoding == null)
{
encoding = Encoding.UTF8;
}
encoding ??= Encoding.UTF8;
byte[] messageBytes = Encoding.UTF8.GetBytes(messageString);
byte[] headerBytes = Encoding.ASCII.GetBytes(string.Format(Constants.ContentLengthFormatString, messageBytes.Length));

View File

@@ -24,10 +24,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ServiceHost
public static ScriptFile GetTestScriptFile(string initialText = null)
{
if (initialText == null)
{
initialText = ScriptFileTests.query;
}
initialText ??= ScriptFileTests.query;
string ownerUri = System.IO.Path.GetTempFileName();

View File

@@ -68,10 +68,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
{
throw new TestDbException();
}
if (RowEnumerator == null)
{
RowEnumerator = ResultSetEnumerator.Current.GetEnumerator();
}
RowEnumerator ??= ResultSetEnumerator.Current.GetEnumerator();
return RowEnumerator.MoveNext();
}