Exemplo n.º 1
0
 internal static void OnChanged(MagnetometerChangedEventArgs e)
 {
     if (useSyncContext)
     {
         MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, e));
     }
     else
     {
         ReadingChanged?.Invoke(null, e);
     }
 }
Exemplo n.º 2
0
        internal static void OnChanged(MagnetometerChangedEventArgs e)
        {
            if (ReadingChanged == null)
            {
                return;
            }

            if (UseSyncContext)
            {
                Platform.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(e));
            }
            else
            {
                ReadingChanged?.Invoke(e);
            }
        }
Exemplo n.º 3
0
        internal static void OnChanged(MagnetometerChangedEventArgs e)
        {
            var handler = ReadingChanged;

            if (handler == null)
            {
                return;
            }

            if (useSyncContext)
            {
                MainThread.BeginInvokeOnMainThread(() => handler?.Invoke(null, e));
            }
            else
            {
                handler?.Invoke(null, e);
            }
        }