static void OnConnectivityChanged(ConnectivityChangedEventArgs e)
 {
     if (currentAccess != e.NetworkAccess || !currentProfiles.SequenceEqual(e.Profiles))
     {
         SetCurrent();
         Platform.BeginInvokeOnMainThread(() => ConnectivityChanagedInternal?.Invoke(e));
     }
 }
예제 #2
0
        internal static void OnChanged(CompassChangedEventArgs e)
        {
            if (ReadingChanged == null)
            {
                return;
            }

            if (UseSyncContext)
            {
                Platform.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(e));
            }
            else
            {
                ReadingChanged?.Invoke(e);
            }
        }
예제 #3
0
        internal static void OnChanged(CompassChangedEventArgs e)
        {
            var handler = ReadingChanged;

            if (handler == null)
            {
                return;
            }

            if (useSyncContext)
            {
                Platform.BeginInvokeOnMainThread(() => handler?.Invoke(e));
            }
            else
            {
                handler?.Invoke(e);
            }
        }
예제 #4
0
 static void BatteryChangedNotification(object sender, NSNotificationEventArgs args)
 => Platform.BeginInvokeOnMainThread(OnBatteryChanged);