コード例 #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));
 }