Exemplo n.º 1
0
 private async Task OnCommitCallbackAsync()
 {
     if (this.commitCallbackAsyncList != null)
     {
         foreach (var action in this.commitCallbackAsyncList)
         {
             try { await action(this); }
             catch (Exception ex)
             {
                 CommitCallbackError?.Invoke(ex);
             }
         }
     }
 }
Exemplo n.º 2
0
        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();
        }