master
Tudor Stanciu 2021-04-17 03:22:05 +03:00
parent 11aa5b5ace
commit 8ee5b5ca41
2 changed files with 5 additions and 5 deletions

View File

@ -24,9 +24,9 @@ namespace NetworkResurrector.Server.Application.CommandHandlers
{ {
try try
{ {
_logger.LogDebug($"Start pinging '{command.IPAddressOrMachineName}'."); _logger.LogDebug($"Start pinging '{command.IpAddressOrMachineName}'.");
var (success, status) = await _pingService.PingMachine(command.IPAddressOrMachineName); var (success, status) = await _pingService.PingMachine(command.IpAddressOrMachineName);
_logger.LogDebug($"Pinging on '{command.IPAddressOrMachineName}' finished. Status: {status}"); _logger.LogDebug($"Pinging on '{command.IpAddressOrMachineName}' finished. Status: {status}");
return new MachinePinged(success, status); return new MachinePinged(success, status);
} }
catch (Exception ex) catch (Exception ex)

View File

@ -6,11 +6,11 @@ namespace NetworkResurrector.Server.Application.Commands
{ {
public class PingMachine : Command<MachinePinged> public class PingMachine : Command<MachinePinged>
{ {
public string IPAddressOrMachineName { get; set; } public string IpAddressOrMachineName { get; set; }
public PingMachine(string ipAddressOrMachineName) : base(new Metadata() { CorrelationId = Guid.NewGuid() }) public PingMachine(string ipAddressOrMachineName) : base(new Metadata() { CorrelationId = Guid.NewGuid() })
{ {
IPAddressOrMachineName = ipAddressOrMachineName; IpAddressOrMachineName = ipAddressOrMachineName;
} }
} }
} }