示例#1
0
 /// <summary>
 /// Dispatches the given IdlePromiseDelegate on the Revit Idle thread synchronously.
 /// </summary>
 /// <param name="p">Delegate to be invoked on the Idle thread.</param>
 /// <returns>Result of the delegate.</returns>
 public static T ExecuteOnIdleSync <T>(IdlePromiseDelegate <T> p)
 {
     return(InIdleThread ? p() : new IdlePromise <T>(p).RedeemPromise());
 }
示例#2
0
 /// <summary>
 /// Dispatches the given IdlePromiseDelegate on the Revit Idle thread asynchronously.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="p"></param>
 public static IdlePromise <T> ExecuteOnIdleAsync <T>(IdlePromiseDelegate <T> p)
 {
     return(new IdlePromise <T>(p));
 }