Skip to content

Commit e5ef82b

Browse files
Mohammad DehghanMohammad Dehghan
authored andcommitted
Rename and move class to RecordingController.Server
1 parent 094b235 commit e5ef82b

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

SG.CodeCoverage.Recorder/GlobalSuppressions.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Project-level suppressions either have no target or are given
44
// a specific target and scoped to a namespace, type, member, etc.
55

6-
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "The exceptions should be sent back to the client that invoked the command.", Scope = "member", Target = "~M:SG.CodeCoverage.Recorder.RecordingControllerServer.ProcessCommand(System.String)~System.String")]
7-
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "This method is async and is not awaited anywhere, so it should not raise any exceptions.", Scope = "member", Target = "~M:SG.CodeCoverage.Recorder.RecordingControllerServer.StartAsync(System.Int32)~System.Threading.Tasks.Task")]
8-
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "This method is async and is not awaited anywhere, so it should not raise any exceptions.", Scope = "member", Target = "~M:SG.CodeCoverage.Recorder.RecordingControllerServer.AcceptAsync(System.Net.Sockets.TcpClient)~System.Threading.Tasks.Task")]
6+
7+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "The exceptions should be sent back to the client that invoked the command.", Scope = "member", Target = "~M:SG.CodeCoverage.Recorder.Server.ProcessCommand(System.String)~System.String")]
8+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "This method is async and is not awaited anywhere, so it should not raise any exceptions.", Scope = "member", Target = "~M:SG.CodeCoverage.Recorder.Server.StartAsync(System.Int32)~System.Threading.Tasks.Task")]
9+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "This method is async and is not awaited anywhere, so it should not raise any exceptions.", Scope = "member", Target = "~M:SG.CodeCoverage.Recorder.Server.AcceptAsync(System.Net.Sockets.TcpClient)~System.Threading.Tasks.Task")]

SG.CodeCoverage.Recorder/HitsRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static class HitsRepository
1010

1111
static HitsRepository()
1212
{
13-
RecordingControllerServer.Initialize();
13+
RecordingController.Server.Initialize();
1414
}
1515

1616
/// <summary>

SG.CodeCoverage.Recorder/RecordingControllerServer.cs renamed to SG.CodeCoverage.Recorder/RecordingController/Server.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
using System.Net.Sockets;
66
using System.Threading.Tasks;
77

8-
namespace SG.CodeCoverage.Recorder
8+
namespace SG.CodeCoverage.Recorder.RecordingController
99
{
10-
public class RecordingControllerServer
10+
public class Server
1111
{
1212
private readonly Dictionary<string, Func<string, string>> _commands;
1313
private readonly ILogger _logger;
14-
private static RecordingControllerServer _instance;
14+
private static Server _instance;
1515
private readonly Task _listeningTask;
1616

17-
public RecordingControllerServer(ILogger logger)
17+
public Server(ILogger logger)
1818
{
1919
_logger = logger;
2020
_commands = new Dictionary<string, Func<string, string>>()
@@ -30,7 +30,7 @@ public static void Initialize()
3030
if (InjectedConstants.ControllerServerPort == 0)
3131
return;
3232
string logFileName = InjectedConstants.RecorderLogFileName;
33-
_instance = new RecordingControllerServer(new SimpleFileLogger(logFileName));
33+
_instance = new Server(new SimpleFileLogger(logFileName));
3434
}
3535

3636
public async Task StartAsync(int port)
@@ -108,7 +108,7 @@ private string ProcessCommand(string command)
108108
else
109109
{
110110
var ok = Constants.CommandOkResponse;
111-
if(result != null)
111+
if (result != null)
112112
return ok + " " + result;
113113
return ok;
114114
}

0 commit comments

Comments
 (0)