public NetworkAvailableService()
 {
     Helper = new NetworkAvailableHelper();
     Helper.AvailabilityChanged += (e)
                                   => AvailabilityChanged?.Invoke(this, new AvailabilityChangedEventArgs {
         ConnectionType = e
     });
 }
Exemple #2
0
 static NetworkService()
 {
     _helper = new NetworkAvailableHelper();
     _helper.AvailabilityChanged += (e) =>
     {
         _messengerService?.Send(new Messages.NetworkAvailabilityChangedMessage(e));
     };
 }
 public NetworkService(IEventAggregator eventAggregator)
 {
     _eventAggregator             = eventAggregator;
     _helper                      = new NetworkAvailableHelper();
     _helper.AvailabilityChanged += (e) =>
     {
         _eventAggregator.GetEvent <PubSubEvent <NetworkAvailabilityChangedMessage> >()
         .Publish(new NetworkAvailabilityChangedMessage(e));
     };
 }