Пример #1
0
        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);
        }
Пример #2
0
 public void Execute()
 {
     NewPingNeeded.Invoke(this, EventArgs.Empty);
 }