Esempio n. 1
0
 public static IScheduler GetScheduler(this ISyncContextProvider context)
 {
     return(SynchronizationContextMixins.GetScheduler(context.SyncContext));
 }
Esempio n. 2
0
 public static void Post(this ISyncContextProvider context, Action action)
 {
     SynchronizationContextMixins.Post(context.SyncContext, action);
 }
Esempio n. 3
0
 /// <summary>
 /// Performs the async action on the specified context and returns a task..
 /// </summary>
 public static Task <T> SendTaskAsync <T>(this ISyncContextProvider context, Func <Task <T> > action)
 {
     return(SynchronizationContextMixins.SendTaskAsync(context.SyncContext, action));
 }
Esempio n. 4
0
 /// <summary>
 /// Performs the action async on the specified context and returns a task.
 /// </summary>
 public static Task SendActionAsync(this ISyncContextProvider context, Action action)
 {
     return(SynchronizationContextMixins.SendActionAsync(context.SyncContext, action));
 }
Esempio n. 5
0
 /// <summary>
 /// Performs the action on the specified context and blocks the current thread until a result returns.
 /// </summary>
 public static T Send <T>(this ISyncContextProvider context, Func <T> action)
 {
     return(SynchronizationContextMixins.Send(context.SyncContext, action));
 }