Example #1
0
 public static Task AttachAndRun(this FrameworkElement view, Action action) =>
 view.AttachAndRun(() =>
 {
     action();
     return(Task.FromResult(true));
 });
Example #2
0
 public static Task AttachAndRun(this FrameworkElement view, Func <Task> action) =>
 view.AttachAndRun(async() =>
 {
     await action();
     return(true);
 });
 public static Task <T> AttachAndRun <T>(this FrameworkElement view, Func <T> action) =>
 view.AttachAndRun(() =>
 {
     var result = action();
     return(Task.FromResult(result));
 });