using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FWindSoft.Revit
{
///
/// revit接收者创建类
///
public class RevitHandlerFactory
{
/*
* 回调有两种整合方法;
* 第一种是在Idling事件里进行拼装
* 第二种是开一个守护线程,等待事件结束标志,然后再执行;
*
* 如果是第一种的话,可以在handler控制,不需要单独去处理这种情况
* 所以采用第二种
*
*/
public static RevitHandler CreateWhileHandler(Func handler, Action callBack)
{
RevitHandler revitHandler = new RevitHandler();
revitHandler.Executing += (sender, args) =>
{
TaskCompletionSource