/// <summary>
        /// Initializes a new instance of the <see cref="TableServiceClient"/> using the specified connection string.
        /// </summary>
        /// <param name="connectionString">
        /// A connection string includes the authentication information
        /// required for your application to access data in an Azure Storage
        /// account at runtime.
        ///
        /// For more information,
        /// <see href="https://docs.microsoft.com/azure/storage/common/storage-configure-connection-string">
        /// Configure Azure Storage connection strings</see>.
        /// </param>
        /// <param name="options">
        /// Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.
        /// </param>
        public TableServiceClient(string connectionString, TableClientOptions options = null)
        {
            Argument.AssertNotNull(connectionString, nameof(connectionString));

            TableConnectionString connString = TableConnectionString.Parse(connectionString);

            _accountName = connString._accountName;

            options ??= new TableClientOptions();
            var endpointString    = connString.TableStorageUri.PrimaryUri.AbsoluteUri;
            var secondaryEndpoint = connString.TableStorageUri.SecondaryUri?.AbsoluteUri;

            _isCosmosEndpoint = TableServiceClient.IsPremiumEndpoint(connString.TableStorageUri.PrimaryUri);
            var perCallPolicies = _isCosmosEndpoint ? new[] { new CosmosPatchTransformPolicy() } : Array.Empty <HttpPipelinePolicy>();

            TableSharedKeyPipelinePolicy policy = connString.Credentials switch
            {
                TableSharedKeyCredential credential => new TableSharedKeyPipelinePolicy(credential),
                _ => default
            };
            HttpPipeline pipeline = HttpPipelineBuilder.Build(options, perCallPolicies: perCallPolicies, perRetryPolicies: new[] { policy }, new ResponseClassifier());

            _version                    = options.VersionString;
            _diagnostics                = new ClientDiagnostics(options);
            _tableOperations            = new TableRestClient(_diagnostics, pipeline, endpointString, _version);
            _serviceOperations          = new ServiceRestClient(_diagnostics, pipeline, endpointString, _version);
            _secondaryServiceOperations = new ServiceRestClient(_diagnostics, pipeline, secondaryEndpoint, _version);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TableServiceClient"/> using the specified connection string.
        /// </summary>
        /// <param name="connectionString">
        /// A connection string includes the authentication information
        /// required for your application to access data in an Azure Storage
        /// account at runtime.
        ///
        /// For more information,
        /// <see href="https://docs.microsoft.com/azure/storage/common/storage-configure-connection-string">
        /// Configure Azure Storage connection strings</see>.
        /// </param>
        /// <param name="options">
        /// Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.
        /// </param>
        public TableServiceClient(string connectionString, TableClientOptions options = null)
        {
            Argument.AssertNotNull(connectionString, nameof(connectionString));

            TableConnectionString connString = TableConnectionString.Parse(connectionString);

            options ??= new TableClientOptions();
            var endpointString    = connString.TableStorageUri.PrimaryUri.AbsoluteUri;
            var secondaryEndpoint = connString.TableStorageUri.SecondaryUri?.AbsoluteUri;

            TableSharedKeyPipelinePolicy policy = connString.Credentials switch
            {
                TableSharedKeyCredential credential => new TableSharedKeyPipelinePolicy(credential),
                _ => default
            };
            HttpPipeline pipeline = HttpPipelineBuilder.Build(options, policy);

            _version                    = options.VersionString;
            _diagnostics                = new ClientDiagnostics(options);
            _tableOperations            = new TableRestClient(_diagnostics, pipeline, endpointString, _version);
            _serviceOperations          = new ServiceRestClient(_diagnostics, pipeline, endpointString, _version);
            _secondaryServiceOperations = new ServiceRestClient(_diagnostics, pipeline, secondaryEndpoint, _version);
            _isPremiumEndpoint          = IsPremiumEndpoint(connString.TableStorageUri.PrimaryUri);
        }