Fix coding style in PingCommand

new string[] -> new[]
This commit is contained in:
2019-03-23 22:41:13 +01:00
parent f03de89815
commit b02114f0f9
2 changed files with 3 additions and 5 deletions

View File

@@ -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)
{

View File

@@ -37,7 +37,7 @@ namespace PlantBox.Shared.Communication.Commands
public override string[] Serialize()
{
return new string[] { Message };
return new[] { Message };
}
}
}