Fix coding style in PingCommand
new string[] -> new[]
This commit is contained in:
@@ -21,13 +21,11 @@ namespace PlantBox.Broker
|
||||
var client = listener.AcceptTcpClient();
|
||||
var stream = new CommandStream(client.GetStream());
|
||||
|
||||
var command = stream.Receive();
|
||||
(var command, var ping) = stream.Receive<PingCommand>();
|
||||
Console.WriteLine(command);
|
||||
|
||||
var ping = new Ping().Deserialize(command.Arguments);
|
||||
Console.WriteLine($"Ping: {ping.Message}");
|
||||
|
||||
stream.Send(new Ping(ping.Message).ToCommandPacket(Command.Ping, command.ID));
|
||||
stream.Send(new PingCommand(ping.Message).ToCommandPacket(command.ID));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace PlantBox.Shared.Communication.Commands
|
||||
|
||||
public override string[] Serialize()
|
||||
{
|
||||
return new string[] { Message };
|
||||
return new[] { Message };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user