| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using System.ComponentModel; |
| | | 5 | | |
| | | 6 | | namespace Azure.Messaging.ServiceBus |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// The set of options that can be specified when creating a <see cref="ServiceBusSender"/> |
| | | 10 | | /// to configure its behavior. |
| | | 11 | | /// </summary> |
| | | 12 | | public class ServiceBusSenderOptions |
| | | 13 | | { |
| | | 14 | | /// <summary> |
| | | 15 | | /// The queue or topic name to route the message through. This is useful when using transactions, in order |
| | | 16 | | /// to allow for completing a transaction involving multiple entities. For instance, if you want to |
| | | 17 | | /// settle a message on Entity A and send a message to Entity B as part of the same transaction, |
| | | 18 | | /// you can use a <see cref="ServiceBusSender"/> for Entity B, with the <see cref="ViaQueueOrTopicName"/> |
| | | 19 | | /// property set to Entity A. |
| | | 20 | | /// </summary> |
| | 102 | 21 | | public string ViaQueueOrTopicName { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Determines whether the specified <see cref="System.Object" /> is equal to this instance. |
| | | 25 | | /// </summary> |
| | | 26 | | /// |
| | | 27 | | /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param> |
| | | 28 | | /// |
| | | 29 | | /// <returns><c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c> |
| | | 30 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 0 | 31 | | public override bool Equals(object obj) => base.Equals(obj); |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Returns a hash code for this instance. |
| | | 35 | | /// </summary> |
| | | 36 | | /// |
| | | 37 | | /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a ha |
| | | 38 | | /// |
| | | 39 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 0 | 40 | | public override int GetHashCode() => base.GetHashCode(); |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Converts the instance to string representation. |
| | | 44 | | /// </summary> |
| | | 45 | | /// |
| | | 46 | | /// <returns>A <see cref="System.String" /> that represents this instance.</returns> |
| | | 47 | | /// |
| | | 48 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 0 | 49 | | public override string ToString() => base.ToString(); |
| | | 50 | | |
| | | 51 | | /// <summary> |
| | | 52 | | /// Creates a new copy of the current <see cref="ServiceBusSenderOptions" />, cloning its attributes into a new |
| | | 53 | | /// </summary> |
| | | 54 | | /// |
| | | 55 | | /// <returns>A new copy of <see cref="ServiceBusSenderOptions" />.</returns> |
| | | 56 | | internal ServiceBusSenderOptions Clone() => |
| | 26 | 57 | | new ServiceBusSenderOptions |
| | 26 | 58 | | { |
| | 26 | 59 | | ViaQueueOrTopicName = ViaQueueOrTopicName |
| | 26 | 60 | | }; |
| | | 61 | | } |
| | | 62 | | } |