Skip to content

Commit

Permalink
Merge pull request #689 from immense/tech/file-scoped-namespaces
Browse files Browse the repository at this point in the history
Convert to file-scoped namespaces.
  • Loading branch information
dkattan authored Jul 25, 2023
2 parents c246798 + a164bca commit 7c58b4f
Show file tree
Hide file tree
Showing 243 changed files with 17,772 additions and 18,015 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ dotnet_style_prefer_simplified_interpolation = true:suggestion

# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = silent
dotnet_style_namespace_match_folder = true:error
[*.cs]
csharp_indent_labels = one_less_than_current
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_namespace_declarations = file_scoped:error
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_methods = false:silent
Expand Down
33 changes: 16 additions & 17 deletions Agent/Extensions/PowerShellCompletionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@
using System.Text;
using System.Threading.Tasks;

namespace Remotely.Agent.Extensions
namespace Remotely.Agent.Extensions;

public static class PowerShellCompletionExtensions
{
public static class PowerShellCompletionExtensions
public static PwshCommandCompletion ToPwshCompletion(this CommandCompletion completion)
{
public static PwshCommandCompletion ToPwshCompletion(this CommandCompletion completion)
return new PwshCommandCompletion()
{
return new PwshCommandCompletion()
{
CurrentMatchIndex = completion.CurrentMatchIndex,
ReplacementIndex = completion.ReplacementIndex,
ReplacementLength = completion.ReplacementLength,
CompletionMatches = completion.CompletionMatches
.Select(x => new PwshCompletionResult(x.CompletionText,
x.ListItemText,
EnumMapper.ToEnum<PwshCompletionResultType, CompletionResultType>(x.ResultType),
x.ToolTip))
.ToList()
};

}
CurrentMatchIndex = completion.CurrentMatchIndex,
ReplacementIndex = completion.ReplacementIndex,
ReplacementLength = completion.ReplacementLength,
CompletionMatches = completion.CompletionMatches
.Select(x => new PwshCompletionResult(x.CompletionText,
x.ListItemText,
EnumMapper.ToEnum<PwshCompletionResultType, CompletionResultType>(x.ResultType),
x.ToolTip))
.ToList()
};

}
}
13 changes: 6 additions & 7 deletions Agent/Interfaces/IAppLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Remotely.Agent.Interfaces
namespace Remotely.Agent.Interfaces;

public interface IAppLauncher
{
public interface IAppLauncher
{
Task<int> LaunchChatService(string pipeName, string userConnectionId, string requesterName, string orgName, string orgId, HubConnection hubConnection);
Task LaunchRemoteControl(int targetSessionId, string sessionId, string accessKey, string userConnectionId, string requesterName, string orgName, string orgId, HubConnection hubConnection);
Task RestartScreenCaster(List<string> viewerIDs, string sessionId, string accessKey, string userConnectionId, string requesterName, string orgName, string orgId, HubConnection hubConnection, int targetSessionID = -1);
}
Task<int> LaunchChatService(string pipeName, string userConnectionId, string requesterName, string orgName, string orgId, HubConnection hubConnection);
Task LaunchRemoteControl(int targetSessionId, string sessionId, string accessKey, string userConnectionId, string requesterName, string orgName, string orgId, HubConnection hubConnection);
Task RestartScreenCaster(List<string> viewerIDs, string sessionId, string accessKey, string userConnectionId, string requesterName, string orgName, string orgId, HubConnection hubConnection, int targetSessionID = -1);
}
9 changes: 4 additions & 5 deletions Agent/Interfaces/IDeviceInformationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
using System.Text;
using System.Threading.Tasks;

namespace Remotely.Agent.Interfaces
namespace Remotely.Agent.Interfaces;

public interface IDeviceInformationService
{
public interface IDeviceInformationService
{
Task<DeviceClientDto> CreateDevice(string deviceId, string orgId);
}
Task<DeviceClientDto> CreateDevice(string deviceId, string orgId);
}
13 changes: 6 additions & 7 deletions Agent/Interfaces/IUpdater.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using System;
using System.Threading.Tasks;

namespace Remotely.Agent.Interfaces
namespace Remotely.Agent.Interfaces;

public interface IUpdater
{
public interface IUpdater
{
Task BeginChecking();
Task CheckForUpdates();
Task InstallLatestVersion();
}
Task BeginChecking();
Task CheckForUpdates();
Task InstallLatestVersion();
}
11 changes: 5 additions & 6 deletions Agent/Models/ChatSession.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System.IO.Pipes;

namespace Remotely.Agent.Models
namespace Remotely.Agent.Models;

public class ChatSession
{
public class ChatSession
{
public int ProcessID { get; set; }
public NamedPipeClientStream PipeStream { get; set; }
}
public int ProcessID { get; set; }
public NamedPipeClientStream PipeStream { get; set; }
}
Loading

0 comments on commit 7c58b4f

Please sign in to comment.