private async Task OnCommitCallbackAsync() { if (this.commitCallbackAsyncList != null) { foreach (var action in this.commitCallbackAsyncList) { try { await action(this); } catch (Exception ex) { CommitCallbackError?.Invoke(ex); } } } }
private void OnCommitCallback() { if (this.commitCallbackList != null) { foreach (var action in this.commitCallbackList) { try { action(this); } catch (Exception ex) { CommitCallbackError?.Invoke(ex); } } } #if !(NET20 || NET40) this.OnCommitCallbackAsync().Wait(); #endif this.ClearCommitCallback(); }