private async void ExecuteInternal() { RoundtripTime = await _Ping.Ping(IPAddress); var newPing = new PingChanged(); newPing.Server = IPAddress; newPing.Ping = RoundtripTime; var args = new PingChangedEventArgs(); args.NewPing = newPing; PingChanged?.Invoke(this, args); await Task.Delay(DefaultPingIntervalTimeSpan); NewPingNeeded.Invoke(this, EventArgs.Empty); }
public void Execute() { NewPingNeeded.Invoke(this, EventArgs.Empty); }