< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Threading;
 5using Azure.Core;
 6
 7namespace Azure.Messaging.EventHubs.Processor
 8{
 9    /// <summary>
 10    ///   Contains information about the partition whose processing is being stopped.
 11    /// </summary>
 12    ///
 13    public class PartitionClosingEventArgs
 14    {
 15        /// <summary>
 16        ///   The identifier of the Event Hub partition this instance is associated with.
 17        /// </summary>
 18        ///
 019        public string PartitionId { get; }
 20
 21        /// <summary>
 22        ///   The reason why the processing for the associated partition is being stopped.
 23        /// </summary>
 24        ///
 025        public ProcessingStoppedReason Reason { get; }
 26
 27        /// <summary>
 28        ///   A <see cref="CancellationToken"/> instance to signal the request to cancel the operation.
 29        /// </summary>
 30        ///
 031        public CancellationToken CancellationToken { get; }
 32
 33        /// <summary>
 34        ///   Initializes a new instance of the <see cref="PartitionClosingEventArgs"/> class.
 35        /// </summary>
 36        ///
 37        /// <param name="partitionId">The identifier of the Event Hub partition this instance is associated with.</param
 38        /// <param name="reason">The reason why the processing for the associated partition is being stopped.</param>
 39        /// <param name="cancellationToken">A <see cref="CancellationToken"/> instance to signal the request to cancel t
 40        ///
 041        public PartitionClosingEventArgs(string partitionId,
 042                                         ProcessingStoppedReason reason,
 043                                         CancellationToken cancellationToken = default)
 44        {
 045            Argument.AssertNotNullOrEmpty(partitionId, nameof(partitionId));
 46
 047            PartitionId = partitionId;
 048            Reason = reason;
 049            CancellationToken = cancellationToken;
 050        }
 51    }
 52}