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

@@ -357,10 +357,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Agent
AgentNotebookInfo notebook = null)
{
var service = new AgentService();
if (notebook == null)
{
notebook = GetTestNotebookInfo("myTestNotebookJob" + Guid.NewGuid().ToString(), "master");
}
notebook ??= GetTestNotebookInfo("myTestNotebookJob" + Guid.NewGuid().ToString(), "master");
string tempNotebookPath = CreateTemplateNotebookFile();
await AgentNotebookHelper.CreateNotebook(

View File

@@ -50,18 +50,12 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.DisasterRecovery
private async Task VerifyBackupFileCreated()
{
if (fullBackupFilePath == null)
{
fullBackupFilePath = await CreateBackupFile();
}
fullBackupFilePath ??= await CreateBackupFile();
}
private async Task<string[]> GetBackupFilesToRecoverDatabaseCreated()
{
if (backupFilesToRecoverDatabase == null)
{
backupFilesToRecoverDatabase = await CreateBackupSetsToRecoverDatabase();
}
backupFilesToRecoverDatabase ??= await CreateBackupSetsToRecoverDatabase();
return backupFilesToRecoverDatabase;
}

View File

@@ -283,10 +283,7 @@ namespace Microsoft.SqlTools.ServiceLayer.PerfTests
TestTimer timer = null,
[CallerMemberName] string testName = "")
{
if (timer == null)
{
timer = new TestTimer { PrintResult = false };
}
timer ??= new TestTimer { PrintResult = false };
bool isReady = !waitForIntelliSense;
await testService.ExecuteWithTimeout(timer, 550000, async () =>
{

View File

@@ -146,8 +146,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common.Baselined
{
get
{
if (this._baselineSubDir == null)
this._baselineSubDir = string.Empty;
this._baselineSubDir ??= string.Empty;
return this._baselineSubDir;
}
set { this._baselineSubDir = value; }

View File

@@ -65,10 +65,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
{
get
{
if (pendingVerifications == null)
{
pendingVerifications = new List<Action>();
}
pendingVerifications ??= new List<Action>();
return pendingVerifications;
}
set => pendingVerifications = value;

View File

@@ -13,6 +13,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TestEnvConfig
{
class Program
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0210:Convert to top-level statements", Justification = "Structure retained for readability.")]
static void Main(string[] args)
{
if (args.Length == 1)

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();
}