< Summary

Class:Azure.Analytics.Synapse.Artifacts.ArtifactsClientOptions
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Customization\ArtifactsClientOptions.cs
Covered lines:7
Uncovered lines:2
Coverable lines:9
Total lines:48
Line coverage:77.7% (7 of 9)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_Default()-0%100%
.ctor(...)-85.71%50%
get_VersionString()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Customization\ArtifactsClientOptions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using Azure.Core;
 5using System;
 6
 7namespace Azure.Analytics.Synapse.Artifacts
 8{
 9    /// <summary>
 10    /// The options for Azure Synapse Artifacts.
 11    /// </summary>
 12    public class ArtifactsClientOptions : ClientOptions
 13    {
 14        private const ServiceVersion Latest = ServiceVersion.V2019_06_01_preview;
 15
 016        internal static ArtifactsClientOptions Default { get; } = new ArtifactsClientOptions();
 17
 18        /// <summary>
 19        /// Initializes a new instance of the <see cref="ArtifactsClientOptions"/>.
 20        /// </summary>
 1621        public ArtifactsClientOptions(ServiceVersion serviceVersion = Latest)
 22        {
 1623            VersionString = serviceVersion switch
 1624            {
 3225                ServiceVersion.V2019_06_01_preview => "2019-06-01-preview",
 026                _ => throw new ArgumentOutOfRangeException(nameof(serviceVersion))
 1627            };
 1628        }
 29
 30        /// <summary>
 31        /// API version for Azuer Synapse Artifacts.
 32        /// </summary>
 1633        internal string VersionString { get; }
 34
 35        /// <summary>
 36        /// The Synapse service version.
 37        /// </summary>
 38        public enum ServiceVersion
 39        {
 40            /// <summary>
 41            /// The 2019-06-01-preview of the template service.
 42            /// </summary>
 43#pragma warning disable CA1707
 44            V2019_06_01_preview = 1
 45#pragma warning restore CA1707
 46        }
 47    }
 48}