< Summary

Class:Azure.Messaging.ServiceBus.Core.ConnectionStringProperties
Assembly:Azure.Messaging.ServiceBus
File(s):C:\Git\azure-sdk-for-net\sdk\servicebus\Azure.Messaging.ServiceBus\src\Core\ConnectionStringProperties.cs
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:64
Line coverage:100% (9 of 9)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_Endpoint()-100%100%
get_EntityPath()-100%100%
get_SharedAccessKeyName()-100%100%
get_SharedAccessKey()-100%100%
.ctor(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\servicebus\Azure.Messaging.ServiceBus\src\Core\ConnectionStringProperties.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5
 6namespace 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        ///
 26821        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        ///
 4627        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        ///
 16234        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        ///
 16041        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        {
 10658            Endpoint = endpoint;
 10659            EntityPath = entityName;
 10660            SharedAccessKeyName = sharedAccessKeyName;
 10661            SharedAccessKey = sharedAccessKey;
 10662        }
 63    }
 64}