/// <summary> /// Called when execution of a command has failed with an exception. />. /// </summary> /// <param name="command"> The command. </param> /// <param name="eventData"> Contextual information about the command and execution. </param> /// <param name="cancellationToken"> The cancellation token. </param> /// <returns> A <see cref="Task"/> representing the asynchronous operation. </returns> public virtual async Task CommandFailedAsync(DbCommand command, CommandErrorEventData eventData, CancellationToken cancellationToken = default) { for (var i = 0; i < _interceptors.Length; i++) { await _interceptors[i].CommandFailedAsync(command, eventData, cancellationToken); } }
/// <summary> /// Called when execution of a command has failed with an exception. />. /// </summary> /// <param name="command"> The command. </param> /// <param name="eventData"> Contextual information about the command and execution. </param> public virtual void CommandFailed(DbCommand command, CommandErrorEventData eventData) { for (var i = 0; i < _interceptors.Length; i++) { _interceptors[i].CommandFailed(command, eventData); } }
/// <summary> /// Called when execution of a command has failed with an exception. />. /// </summary> /// <param name="command"> The command. </param> /// <param name="eventData"> Contextual information about the command and execution. </param> /// <param name="cancellationToken"> The cancellation token. </param> /// <returns> A <see cref="Task"/> representing the asynchronous operation. </returns> public virtual Task CommandFailedAsync( DbCommand command, CommandErrorEventData eventData, CancellationToken cancellationToken = default) => Task.CompletedTask;
/// <summary> /// Called when execution of a command has failed with an exception. />. /// </summary> /// <param name="command"> The command. </param> /// <param name="eventData"> Contextual information about the command and execution. </param> public virtual void CommandFailed( DbCommand command, CommandErrorEventData eventData) { }