Example #1
0
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="IndexActionCompletedEventArgs{T}"/> class.
 /// </summary>
 /// <param name="sender">
 /// The <see cref="SearchIndexingBufferedSender{T}"/> raising the event.
 /// </param>
 /// <param name="action">
 /// The <see cref="IndexDocumentsAction{T}"/> that was completed.
 /// </param>
 /// <param name="result">
 /// The <see cref="IndexingResult"/> of an action that was successfully
 /// completed.
 /// </param>
 /// <param name="isRunningSynchronously">
 /// A value indicating whether the event handler was invoked
 /// synchronously or asynchronously.  Please see
 /// <see cref="Azure.Core.SyncAsyncEventHandler{T}"/> for more details.
 /// </param>
 /// <param name="cancellationToken">
 /// A cancellation token related to the original operation that raised
 /// the event.  It's important for your handler to pass this token
 /// along to any asynchronous or long-running synchronous operations
 /// that take a token so cancellation will correctly propagate.  The
 /// default value is <see cref="CancellationToken.None"/>.
 /// </param>
 /// <exception cref = "System.ArgumentNullException" >
 /// Thrown if <paramref name="sender"/>, <paramref name="action"/>, or
 /// <paramref name="result"/> are null.
 /// </exception>
 public IndexActionCompletedEventArgs(
     SearchIndexingBufferedSender <T> sender,
     IndexDocumentsAction <T> action,
     IndexingResult result,
     bool isRunningSynchronously,
     CancellationToken cancellationToken = default)
     : base(sender, action, isRunningSynchronously, cancellationToken)
 {
     Argument.AssertNotNull(result, nameof(result));
     Result = result;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="IndexActionEventArgs{T}"/>
 /// class.
 /// </summary>
 /// <param name="sender">
 /// The <see cref="SearchIndexingBufferedSender{T}"/> raising the event.
 /// </param>
 /// <param name="action">
 /// The <see cref="IndexDocumentsAction{T}"/> that was added, sent,
 /// completed, or failed.
 /// </param>
 /// <param name="runSynchronously">
 /// A value indicating whether the event handler was invoked
 /// synchronously or asynchronously.  Please see
 /// <see cref="Azure.Core.SyncAsyncEventHandler{T}"/> for more details.
 /// </param>
 /// <param name="cancellationToken">
 /// A cancellation token related to the original operation that raised
 /// the event.  It's important for your handler to pass this token
 /// along to any asynchronous or long-running synchronous operations
 /// that take a token so cancellation will correctly propagate.  The
 /// default value is <see cref="CancellationToken.None"/>.
 /// </param>
 /// <exception cref="System.ArgumentNullException">
 /// Thrown if <paramref name="sender"/> or <paramref name="action"/>
 /// are null.
 /// </exception>
 public IndexActionEventArgs(
     SearchIndexingBufferedSender <T> sender,
     IndexDocumentsAction <T> action,
     bool runSynchronously,
     CancellationToken cancellationToken = default)
     : base(runSynchronously, cancellationToken)
 {
     Argument.AssertNotNull(sender, nameof(sender));
     Argument.AssertNotNull(action, nameof(action));
     Sender = sender;
     Action = action;
 }
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="IndexActionCompletedEventArgs{T}"/> class.
 /// </summary>
 /// <param name="sender">
 /// The <see cref="SearchIndexingBufferedSender{T}"/> raising the event.
 /// </param>
 /// <param name="action">
 /// The <see cref="IndexDocumentsAction{T}"/> that failed.
 /// </param>
 /// <param name="result">
 /// The <see cref="IndexingResult"/> of an action that failed to
 /// complete.
 /// </param>
 /// <param name="exception">
 /// the <see cref="Exception"/> caused by an action that failed to
 /// complete.
 /// </param>
 /// <param name="isRunningSynchronously">
 /// A value indicating whether the event handler was invoked
 /// synchronously or asynchronously.  Please see
 /// <see cref="Azure.Core.SyncAsyncEventHandler{T}"/> for more details.
 /// </param>
 /// <param name="cancellationToken">
 /// A cancellation token related to the original operation that raised
 /// the event.  It's important for your handler to pass this token
 /// along to any asynchronous or long-running synchronous operations
 /// that take a token so cancellation will correctly propagate.  The
 /// default value is <see cref="CancellationToken.None"/>.
 /// </param>
 /// <exception cref="System.ArgumentNullException">
 /// Thrown if <paramref name="sender"/> or <paramref name="action"/>
 /// are null.
 /// </exception>
 public IndexActionFailedEventArgs(
     SearchIndexingBufferedSender <T> sender,
     IndexDocumentsAction <T> action,
     IndexingResult result,
     Exception exception,
     bool isRunningSynchronously,
     CancellationToken cancellationToken = default)
     : base(sender, action, isRunningSynchronously, cancellationToken)
 {
     // Do not validate - either might be null
     Result    = result;
     Exception = exception;
 }