示例#1
0
 internal static TaskPromise CreateTaskPromise(this BaseControls controler, bool complete = false, bool fail = false, Exception exception = null, object result = null)
 {
     return(new CustemoTaskPromise()
     {
         Complete = complete,
         Fail = fail,
         Error = exception,
         Result = result
     });
 }
示例#2
0
 internal static TaskPromise CreateTaskPromise(this BaseControls controler, Action action)
 {
     return(new DefaultTaskPromise(Task.Factory.StartNew(action)));
 }
示例#3
0
 internal static TaskPromise CreateTaskPromise <T>(this BaseControls controler, Func <T> action)
 {
     return(new DefaultResultTaskPromise <T>(Task.Factory.StartNew <T>(action)));
 }
示例#4
0
 internal static TaskPromise CreateTaskPromise <T>(this BaseControls controler, Task <T> task)
 {
     return(new DefaultResultTaskPromise <T>(task));
 }