Remove TableServiceClient ctor that only accepts options with no url or auth mechanism. (#6140)

* Remove TableServiceClient ctor that only accepts options with no url or auth mechanism.

* Add CL entry.

* Fix wording of CL.
This commit is contained in:
Ahson Khan 2024-10-29 15:01:38 -07:00 committed by GitHub
parent cfd1a433ea
commit 6dc58c07d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 26 deletions

View File

@ -7,6 +7,7 @@
### Breaking Changes
- Removed ServiceVersion type and changed the ApiVersion field within `TableClientOptions` to be std::string.
- Removed the `TableServiceClient` constructor that only accepts one defaulted options parameter.
### Bugs Fixed

View File

@ -343,14 +343,6 @@ namespace Azure { namespace Data { namespace Tables {
*/
class TableServiceClient final {
public:
/**
* @brief Initializes a new instance of tableServiceClient.
*
* @param options Optional client options that define the transport pipeline policies for
* authentication, retries, etc., that are applied to every request.
*/
explicit TableServiceClient(const TableClientOptions& options = {});
/**
* @brief Initializes a new instance of tableClient.
*

View File

@ -19,21 +19,6 @@ using namespace Azure::Data::Tables::_detail::Xml;
using namespace Azure::Data::Tables::Credentials::_detail;
using namespace Azure::Data::Tables::_detail;
TableServiceClient::TableServiceClient(const TableClientOptions& options)
{
TableClientOptions newOptions = options;
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perRetryPolicies;
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perOperationPolicies;
perRetryPolicies.emplace_back(std::make_unique<TimeoutPolicy>());
perOperationPolicies.emplace_back(std::make_unique<ServiceVersionPolicy>(newOptions.ApiVersion));
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
_detail::TablesServicePackageName,
PackageVersion::ToString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
TableServiceClient::TableServiceClient(
const std::string& serviceUrl,
const TableClientOptions& options)
@ -55,8 +40,6 @@ TableServiceClient::TableServiceClient(
const std::string& serviceUrl,
std::shared_ptr<Core::Credentials::TokenCredential> credential,
const TableClientOptions& options)
: TableServiceClient(options)
{
m_tokenCredential = credential;
TableClientOptions newOptions = options;
@ -160,7 +143,7 @@ TableServiceClient TableServiceClient::CreateFromConnectionString(
}
else
{
return TableServiceClient(options);
return TableServiceClient(tablesUrl.GetAbsoluteUrl(), options);
}
}