| | 1 | | // Copyright (c) Microsoft. All rights reserved. |
| | 2 | | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| | 3 | |
|
| | 4 | | using Microsoft.Azure.ServiceBus.Core; |
| | 5 | |
|
| | 6 | | namespace Microsoft.Azure.ServiceBus |
| | 7 | | { |
| | 8 | | using System; |
| | 9 | |
|
| | 10 | | /// <summary>Provides data for the <see cref="MessageHandlerOptions.ExceptionReceivedHandler" /> event.</summary> |
| | 11 | | public sealed class ExceptionReceivedEventArgs : EventArgs |
| | 12 | | { |
| | 13 | | /// <summary>Initializes a new instance of the <see cref="ExceptionReceivedEventArgs" /> class.</summary> |
| | 14 | | /// <param name="exception">The exception that this event data belongs to.</param> |
| | 15 | | /// <param name="action">The action associated with the event.</param> |
| | 16 | | /// <param name="endpoint">The endpoint used when this exception occurred.</param> |
| | 17 | | /// <param name="entityName">The entity path used when this exception occurred.</param> |
| | 18 | | /// <param name="clientId">The Client Id can be used to associate with the <see cref="QueueClient"/>, <see cref= |
| 0 | 19 | | public ExceptionReceivedEventArgs(Exception exception, string action, string endpoint, string entityName, string |
| | 20 | | { |
| 0 | 21 | | this.Exception = exception; |
| 0 | 22 | | this.ExceptionReceivedContext = new ExceptionReceivedContext(action, endpoint, entityName, clientId); |
| 0 | 23 | | } |
| | 24 | |
|
| | 25 | | /// <summary>Gets the parent class exception to which this event data belongs.</summary> |
| | 26 | | /// <value>The exception, generated by the parent class, to which this event data belongs.</value> |
| 0 | 27 | | public Exception Exception { get; } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Gets the context of the exception (action, namespace name, and entity path). |
| | 31 | | /// </summary> |
| 0 | 32 | | public ExceptionReceivedContext ExceptionReceivedContext { get; } |
| | 33 | | } |
| | 34 | | } |