< Summary

Class:Azure.Messaging.EventHubs.Core.EventHubConnectionOptionsExtensions
Assembly:Azure.Messaging.EventHubs.Processor
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs.Shared\src\Core\EventHubConnectionOptionsExtensions.cs
Covered lines:5
Uncovered lines:0
Coverable lines:5
Total lines:28
Line coverage:100% (5 of 5)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
Clone(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs.Shared\src\Core\EventHubConnectionOptionsExtensions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4namespace Azure.Messaging.EventHubs.Core
 5{
 6    /// <summary>
 7    ///   The set of extension methods for the <see cref="EventHubConnectionOptions" />
 8    ///   class.
 9    /// </summary>
 10    ///
 11    internal static class EventHubConnectionOptionsExtensions
 12    {
 13        /// <summary>
 14        ///   Creates a new copy of the current <see cref="EventHubConnectionOptions" />, cloning its attributes into a 
 15        /// </summary>
 16        ///
 17        /// <param name="instance">The instance that this method was invoked on.</param>
 18        ///
 19        /// <returns>A new copy of <see cref="EventHubConnectionOptions" />.</returns>
 20        ///
 21        public static EventHubConnectionOptions Clone(this EventHubConnectionOptions instance) =>
 5022            new EventHubConnectionOptions
 5023            {
 5024                TransportType = instance.TransportType,
 5025                Proxy = instance.Proxy
 5026            };
 27    }
 28}

Methods/Properties

Clone(...)