| | 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>Context provided for <see cref="ExceptionReceivedEventArgs"/> exception raised by the client.</summary> |
| | 11 | | public class ExceptionReceivedContext |
| | 12 | | { |
| | 13 | | /// <summary>Initializes a new instance of the <see cref="ExceptionReceivedContext" /> class.</summary> |
| | 14 | | /// <param name="action">The action associated with the exception.</param> |
| | 15 | | /// <param name="endpoint">The endpoint associated with the exception.</param> |
| | 16 | | /// <param name="entityPath">The entity path associated with the exception.</param> |
| | 17 | | /// <param name="clientId">The Client Id can be used to associate with the <see cref="QueueClient"/>, <see cref= |
| 0 | 18 | | public ExceptionReceivedContext(string action, string endpoint, string entityPath, string clientId) |
| | 19 | | { |
| 0 | 20 | | Action = action ?? throw new ArgumentNullException(nameof(action)); |
| 0 | 21 | | Endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); |
| 0 | 22 | | EntityPath = entityPath ?? throw new ArgumentNullException(nameof(entityPath)); |
| 0 | 23 | | ClientId = clientId ?? throw new ArgumentNullException(nameof(clientId)); |
| 0 | 24 | | } |
| | 25 | |
|
| | 26 | | /// <summary>Gets the action associated with the event.</summary> |
| | 27 | | /// <value>The action associated with the event.</value> |
| 0 | 28 | | public string Action { get; } |
| | 29 | |
|
| | 30 | | /// <summary>The namespace name used when this exception occurred.</summary> |
| 0 | 31 | | public string Endpoint { get; } |
| | 32 | |
|
| | 33 | | /// <summary>The entity path used when this exception occurred.</summary> |
| 0 | 34 | | public string EntityPath { get; } |
| | 35 | |
|
| | 36 | | /// <summary>The Client Id associated with the sender, receiver or session when this exception occurred.</summar |
| 0 | 37 | | public string ClientId { get; } |
| | 38 | | } |
| | 39 | | } |