/// <summary> /// 触发线程执行完成事件 /// </summary> /// <param name="type">线程执行完成类型</param> /// <param name="ex">当执行异常可取消时可能的异常信息</param> private void OnRaiseCompleted(ThreadExCompletedType type, Exception ex = null) { var handler = this.Completed; handler?.Invoke(this, new ThreadExCompletedArgs(type, ex)); }
/// <summary> /// 构造函数 /// </summary> /// <param name="type">线程执行完成类型</param> /// <param name="ex">当执行异常可取消时可能的异常信息</param> public ThreadExCompletedArgs(ThreadExCompletedType type, Exception ex) { this.Type = type; this.Exception = ex; }