Exemplo n.º 1
0
 public Task <TResult> Invoke()
 {
     return(ContextRunner.Run(() => WeakFunc.Execute()));
 }
Exemplo n.º 2
0
 public ContextFunc(TaskScheduler scheduler, WeakFunc <TResult> wa)
     : this(scheduler.ToContextRunner(), wa)
 {
 }
Exemplo n.º 3
0
 public ContextFunc(WeakFunc <TResult> wa)
     : this(Exec.RunningTaskScheduler, wa)
 {
 }
Exemplo n.º 4
0
 public ContextFunc(AsyncContextRunner contextRunner, WeakFunc <TResult> wa)
 {
     WeakFunc      = wa;
     ContextRunner = contextRunner;
 }
Exemplo n.º 5
0
 public ContextMulticastFuncTask <T> Add(AsyncContextRunner runner, WeakFunc <T, Task> wa)
 {
     return(new ContextMulticastFuncTask <T>(_actions.Concat(wa.InContext(runner))));
 }
Exemplo n.º 6
0
 public static ContextFunc <T, TRes> InContext <T, TRes>(this WeakFunc <T, TRes> wa)
 {
     return(new ContextFunc <T, TRes>(wa));
 }
Exemplo n.º 7
0
 public static ContextFunc <T, TRes> InContext <T, TRes>(this WeakFunc <T, TRes> wa, TaskScheduler scheduler)
 {
     return(new ContextFunc <T, TRes>(scheduler, wa));
 }
Exemplo n.º 8
0
 public static ContextFunc <T, TRes> InContext <T, TRes>(this WeakFunc <T, TRes> wa, AsyncContextRunner context)
 {
     return(new ContextFunc <T, TRes>(context, wa));
 }