static void OnConnectivityChanged(ConnectivityChangedEventArgs e) { if (currentAccess != e.NetworkAccess || !currentProfiles.SequenceEqual(e.Profiles)) { SetCurrent(); Platform.BeginInvokeOnMainThread(() => ConnectivityChanagedInternal?.Invoke(e)); } }
internal static void OnChanged(CompassChangedEventArgs e) { if (ReadingChanged == null) { return; } if (UseSyncContext) { Platform.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(e)); } else { ReadingChanged?.Invoke(e); } }
internal static void OnChanged(CompassChangedEventArgs e) { var handler = ReadingChanged; if (handler == null) { return; } if (useSyncContext) { Platform.BeginInvokeOnMainThread(() => handler?.Invoke(e)); } else { handler?.Invoke(e); } }
static void BatteryChangedNotification(object sender, NSNotificationEventArgs args) => Platform.BeginInvokeOnMainThread(OnBatteryChanged);