/// <inheritdoc/>
        public IAsyncResult BeginRun(AcadCommand command, IProcess process, AsyncCallback completionCallback, object asyncState)
        {
            if (command == null)
                throw new ArgumentNullException("command");
            if (process == null)
                throw new ArgumentNullException("process");
            if (process.HasExited)
                throw new ArgumentNullException("process", "Process has exited.");

            var task = new CommandTask(command, process, completionCallback, asyncState);
            return task.Begin();
        }
示例#2
0
        /// <inheritdoc/>
        public IAsyncResult BeginRun(AcadCommand command, IProcess process, AsyncCallback completionCallback, object asyncState)
        {
            if (command == null)
            {
                throw new ArgumentNullException("command");
            }
            if (process == null)
            {
                throw new ArgumentNullException("process");
            }
            if (process.HasExited)
            {
                throw new ArgumentNullException("process", "Process has exited.");
            }

            var task = new CommandTask(command, process, completionCallback, asyncState);

            return(task.Begin());
        }