Example #1
0
 public static void InvokeOnMainThread <T>(this Action <T> action, T t, [CallerMemberName] string memberName = "",
                                           [CallerFilePath] string sourceFilePath  = "",
                                           [CallerLineNumber] int sourceLineNumber = 0)
 {
     App.RunOnMainThread(() =>
     {
         using (new EventLogger(memberName))
             action.Invoke(t);
     });
 }
Example #2
0
 public static void InvokeOnMainThread <T>(this EventHandler <SimpleTables.EventArgs <T> > handler, object sender, T args, [CallerMemberName] string memberName = "",
                                           [CallerFilePath] string sourceFilePath  = "",
                                           [CallerLineNumber] int sourceLineNumber = 0)
 {
     App.RunOnMainThread(() =>
     {
         using (new EventLogger(memberName))
             handler.Invoke(sender, new SimpleTables.EventArgs <T>(args));
     });
 }
Example #3
0
 public static void InvokeOnMainThread(this EventHandler handler, object sender, EventArgs args, [CallerMemberName] string memberName = "",
                                       [CallerFilePath] string sourceFilePath  = "",
                                       [CallerLineNumber] int sourceLineNumber = 0)
 {
     App.RunOnMainThread(() =>
     {
         using (new EventLogger(memberName))
             handler.Invoke(sender, args);
     });
 }
 public static void InvokeOnMainThread <T>(this Action <T> action, T t, [CallerMemberName] string memberName = "",
                                           [CallerFilePath] string sourceFilePath  = "",
                                           [CallerLineNumber] int sourceLineNumber = 0)
 {
     App.RunOnMainThread(() =>
     {
         try{
             using (new EventLogger(memberName))
                 action?.Invoke(t);
         }
         catch (Exception ex)
         {
             LogManager.Shared.Report(ex);
         }
     });
 }
 public static void InvokeOnMainThread <T>(this EventHandler <SimpleTables.EventArgs <T> > handler, object sender, T args, [CallerMemberName] string memberName = "",
                                           [CallerFilePath] string sourceFilePath  = "",
                                           [CallerLineNumber] int sourceLineNumber = 0)
 {
     App.RunOnMainThread(() =>
     {
         try{
             using (new EventLogger(memberName))
                 handler?.Invoke(sender, new SimpleTables.EventArgs <T>(args));
         }
         catch (Exception ex)
         {
             LogManager.Shared.Report(ex);
         }
     });
 }
Example #6
0
 public static void InvokeOnMainThread <T>(this EventHandler <T> handler, object sender, T args) where T : EventArgs
 {
     App.RunOnMainThread(() => handler.Invoke(sender, args));
 }
Example #7
0
 public static void InvokeOnMainThread <T>(this Action <T> action, T t)
 {
     App.RunOnMainThread(() => action.Invoke(t));
 }
Example #8
0
 public static void InvokeOnMainThread(this Action action)
 {
     App.RunOnMainThread(action.Invoke);
 }
Example #9
0
 public static void InvokeOnMainThread <T>(this EventHandler <SimpleTables.EventArgs <T> > handler, object sender, T args)
 {
     App.RunOnMainThread(() => handler.Invoke(sender, new SimpleTables.EventArgs <T>(args)));
 }
Example #10
0
 public static void InvokeOnMainThread(this EventHandler handler, object sender, EventArgs args)
 {
     App.RunOnMainThread(() => handler.Invoke(sender, args));
 }