[PowerToys Run] Plugins StyleCop and warnings fix (#12623)

This commit is contained in:
Davide Giacometti
2021-08-11 17:22:30 +02:00
committed by GitHub
parent 7ea1f26209
commit 1791246a79
25 changed files with 251 additions and 128 deletions

View File

@@ -1,4 +1,8 @@
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper;
namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.RemoteMachinesHelper
{

View File

@@ -1,16 +1,22 @@
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.SshConfigParser;
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper;
using Newtonsoft.Json;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.IO;
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.SshConfigParser;
using Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper;
using Newtonsoft.Json;
using Wox.Plugin.Logger;
namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.RemoteMachinesHelper
{
public class VSCodeRemoteMachinesApi
{
public VSCodeRemoteMachinesApi() { }
public VSCodeRemoteMachinesApi()
{
}
public List<VSCodeRemoteMachine> Machines
{
@@ -18,7 +24,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.RemoteMachinesHelper
{
var results = new List<VSCodeRemoteMachine>();
foreach (var vscodeInstance in VSCodeInstances.instances)
foreach (var vscodeInstance in VSCodeInstances.Instances)
{
// settings.json contains path of ssh_config
var vscode_settings = Path.Combine(vscodeInstance.AppData, "User\\settings.json");
@@ -40,8 +46,8 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.RemoteMachinesHelper
var machine = new VSCodeRemoteMachine();
machine.Host = h.Host;
machine.VSCodeInstance = vscodeInstance;
machine.HostName = h.HostName != null ? h.HostName : String.Empty;
machine.User = h.User != null ? h.User : String.Empty;
machine.HostName = h.HostName != null ? h.HostName : string.Empty;
machine.User = h.User != null ? h.User : string.Empty;
results.Add(machine);
}
@@ -57,8 +63,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.RemoteMachinesHelper
}
return results;
}
}
}
}
}