-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
ServiceBusSenderOptions.cs
59 lines (53 loc) · 2.34 KB
/
ServiceBusSenderOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System.ComponentModel;
namespace Azure.Messaging.ServiceBus
{
/// <summary>
/// The set of options that can be specified when creating a <see cref="ServiceBusSender"/>
/// to configure its behavior.
/// </summary>
public class ServiceBusSenderOptions
{
/// <summary>
/// A property used to set the <see cref="ServiceBusSender"/> ID to identify the client. This can be used to correlate logs
/// and exceptions. If <c>null</c> or empty, a random unique value will be used.
/// </summary>
public string Identifier { get; set; }
/// <summary>
/// Determines whether the specified <see cref="System.Object" /> is equal to this instance.
/// </summary>
///
/// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param>
///
/// <returns><c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object obj) => base.Equals(obj);
/// <summary>
/// Returns a hash code for this instance.
/// </summary>
///
/// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
///
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Converts the instance to string representation.
/// </summary>
///
/// <returns>A <see cref="System.String" /> that represents this instance.</returns>
///
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary>
/// Creates a new copy of the current <see cref="ServiceBusReceiverOptions" />, cloning its attributes into a new instance.
/// </summary>
///
/// <returns>A new copy of <see cref="ServiceBusReceiverOptions" />.</returns>
internal ServiceBusSenderOptions Clone() =>
new ServiceBusSenderOptions
{
Identifier = Identifier
};
}
}