public async Task <int> OnExecuteAsync(CancellationToken ct) { ExecuteStarted.TrySetResult(null); Token = ct; var tcs = new TaskCompletionSource <object?>(); ct.Register(() => tcs.TrySetResult(null)); await tcs.Task; return(4); }
/// <summary> /// 変換開始イベントを実行する /// </summary> /// <param name="sender">イベント呼び出し元オブジェクト</param> /// <param name="e">e</param> private void Command_ExecuteStarted(object sender, EventArgs e) => ExecuteStarted?.Invoke(this, new EventArgs());