public TableServiceClient(Uri endpoint, TablesSharedKeyCredential credential, TableClientOptions options = null)
        {
            Argument.AssertNotNull(endpoint, nameof(endpoint));
            Argument.AssertNotNull(credential, nameof(credential));

            options ??= new TableClientOptions();

            var endpointString = endpoint.ToString();
            var pipeline       = HttpPipelineBuilder.Build(options, new TablesSharedKeyPipelinePolicy(credential));
            var diagnostics    = new ClientDiagnostics(options);

            _tableOperations = new TableInternalClient(diagnostics, pipeline, endpointString);
        }
        internal TableServiceClient(Uri endpoint, TableSharedKeyPipelinePolicy policy, TableClientOptions options)
        {
            Argument.AssertNotNull(endpoint, nameof(endpoint));
            if (endpoint.Scheme != "https")
            {
                throw new ArgumentException("Cannot use TokenCredential without HTTPS.");
            }
            options ??= new TableClientOptions();
            var          endpointString = endpoint.ToString();
            HttpPipeline pipeline;

            if (policy == default)
            {
                pipeline = HttpPipelineBuilder.Build(options);
            }
            else
            {
                pipeline = HttpPipelineBuilder.Build(options, policy);
            }

            var diagnostics = new ClientDiagnostics(options);

            _tableOperations = new TableInternalClient(diagnostics, pipeline, endpointString);
        }
Пример #3
0
 internal TableClient(string table, TableInternalClient tableOperations)
 {
     _tableOperations = tableOperations;
     _table           = table;
     _format          = OdataMetadataFormat.ApplicationJsonOdataFullmetadata;
 }