< Summary

Class:Azure.Messaging.EventHubs.Processor.ProcessErrorEventArgs
Assembly:Azure.Messaging.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs\src\Processor\ProcessErrorEventArgs.cs
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:66
Line coverage:0% (0 of 11)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_PartitionId()-0%100%
get_Operation()-0%100%
get_Exception()-0%100%
get_CancellationToken()-0%100%
.ctor(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs\src\Processor\ProcessErrorEventArgs.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Threading;
 6using Azure.Core;
 7
 8namespace Azure.Messaging.EventHubs.Processor
 9{
 10    /// <summary>
 11    ///   Contains information about a partition whose processing threw an exception, as well as
 12    ///   the exception that has been thrown.
 13    /// </summary>
 14    ///
 15    /// <seealso href="https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor" />
 16    ///
 17    public struct ProcessErrorEventArgs
 18    {
 19        /// <summary>
 20        ///   The identifier of the partition whose processing threw an exception.
 21        /// </summary>
 22        ///
 023        public string PartitionId { get; }
 24
 25        /// <summary>
 26        ///   A short description of the operation that was being performed when the exception was thrown.
 27        /// </summary>
 28        ///
 029        public string Operation { get; }
 30
 31        /// <summary>
 32        ///   The exception that was thrown by the <c>EventProcessorClient</c>.
 33        /// </summary>
 34        ///
 035        public Exception Exception { get; }
 36
 37        /// <summary>
 38        ///   A <see cref="CancellationToken"/> instance to signal the request to cancel the operation.
 39        /// </summary>
 40        ///
 041        public CancellationToken CancellationToken { get; }
 42
 43        /// <summary>
 44        ///   Initializes a new instance of the <see cref="ProcessErrorEventArgs"/> structure.
 45        /// </summary>
 46        ///
 47        /// <param name="partitionId">The identifier of the partition whose processing threw an exception.</param>
 48        /// <param name="operation">A short description of the operation that was being performed when the exception was
 49        /// <param name="exception">The exception that was thrown by the <c>EventProcessorClient</c>.</param>
 50        /// <param name="cancellationToken">A <see cref="CancellationToken"/> instance to signal the request to cancel t
 51        ///
 52        public ProcessErrorEventArgs(string partitionId,
 53                                     string operation,
 54                                     Exception exception,
 55                                     CancellationToken cancellationToken = default)
 56        {
 057            Argument.AssertNotNull(operation, nameof(operation));
 058            Argument.AssertNotNull(exception, nameof(exception));
 59
 060            PartitionId = partitionId;
 061            Operation = operation;
 062            Exception = exception;
 063            CancellationToken = cancellationToken;
 064        }
 65    }
 66}