| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | |
| | | 6 | | namespace Azure.Messaging.ServiceBus.Core |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// The set of properties that comprise a connection string from the |
| | | 10 | | /// Azure portal. |
| | | 11 | | /// </summary> |
| | | 12 | | /// |
| | | 13 | | internal struct ConnectionStringProperties |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// The endpoint to be used for connecting to the Service Bus namespace. |
| | | 17 | | /// </summary> |
| | | 18 | | /// |
| | | 19 | | /// <value>The endpoint address, including protocol, from the connection string.</value> |
| | | 20 | | /// |
| | 268 | 21 | | public Uri Endpoint { get; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// The name of the specific Service Bus entity instance under the associated Service Bus namespace. |
| | | 25 | | /// </summary> |
| | | 26 | | /// |
| | 46 | 27 | | public string EntityPath { get; } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// The name of the shared access key, either for the Service Bus namespace |
| | | 31 | | /// or the Service Bus entity. |
| | | 32 | | /// </summary> |
| | | 33 | | /// |
| | 162 | 34 | | public string SharedAccessKeyName { get; } |
| | | 35 | | |
| | | 36 | | /// <summary> |
| | | 37 | | /// The value of the shared access key, either for the Service Bus namespace |
| | | 38 | | /// or the Service Bus entity. |
| | | 39 | | /// </summary> |
| | | 40 | | /// |
| | 160 | 41 | | public string SharedAccessKey { get; } |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Initializes a new instance of the <see cref="ConnectionStringProperties"/> structure. |
| | | 45 | | /// </summary> |
| | | 46 | | /// |
| | | 47 | | /// <param name="endpoint">The endpoint of the Service Bus namespace.</param> |
| | | 48 | | /// <param name="entityName">The name of the specific Service Bus entity under the namespace.</param> |
| | | 49 | | /// <param name="sharedAccessKeyName">The name of the shared access key, to use authorization.</param> |
| | | 50 | | /// <param name="sharedAccessKey">The shared access key to use for authorization.</param> |
| | | 51 | | /// |
| | | 52 | | public ConnectionStringProperties( |
| | | 53 | | Uri endpoint, |
| | | 54 | | string entityName, |
| | | 55 | | string sharedAccessKeyName, |
| | | 56 | | string sharedAccessKey) |
| | | 57 | | { |
| | 106 | 58 | | Endpoint = endpoint; |
| | 106 | 59 | | EntityPath = entityName; |
| | 106 | 60 | | SharedAccessKeyName = sharedAccessKeyName; |
| | 106 | 61 | | SharedAccessKey = sharedAccessKey; |
| | 106 | 62 | | } |
| | | 63 | | } |
| | | 64 | | } |