Rename Get{Block/Append/Page}BlobClient -> As{Block/Append/Page}BlobClient (#995)
This commit is contained in:
parent
71c5cca9d5
commit
c6da8da8c7
@ -94,7 +94,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*
|
||||
* @return A new BlockBlobClient instance.
|
||||
*/
|
||||
BlockBlobClient GetBlockBlobClient() const;
|
||||
BlockBlobClient AsBlockBlobClient() const;
|
||||
|
||||
/**
|
||||
* @brief Creates a new AppendBlobClient object with the same uri as this BlobClient.
|
||||
@ -102,7 +102,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*
|
||||
* @return A new AppendBlobClient instance.
|
||||
*/
|
||||
AppendBlobClient GetAppendBlobClient() const;
|
||||
AppendBlobClient AsAppendBlobClient() const;
|
||||
|
||||
/**
|
||||
* @brief Creates a new PageBlobClient object with the same uri as this BlobClient.
|
||||
@ -110,7 +110,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*
|
||||
* @return A new PageBlobClient instance.
|
||||
*/
|
||||
PageBlobClient GetPageBlobClient() const;
|
||||
PageBlobClient AsPageBlobClient() const;
|
||||
|
||||
/**
|
||||
* @brief Gets the blob's primary uri endpoint.
|
||||
|
||||
@ -116,11 +116,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::HttpPipeline>(policies);
|
||||
}
|
||||
|
||||
BlockBlobClient BlobClient::GetBlockBlobClient() const { return BlockBlobClient(*this); }
|
||||
BlockBlobClient BlobClient::AsBlockBlobClient() const { return BlockBlobClient(*this); }
|
||||
|
||||
AppendBlobClient BlobClient::GetAppendBlobClient() const { return AppendBlobClient(*this); }
|
||||
AppendBlobClient BlobClient::AsAppendBlobClient() const { return AppendBlobClient(*this); }
|
||||
|
||||
PageBlobClient BlobClient::GetPageBlobClient() const { return PageBlobClient(*this); }
|
||||
PageBlobClient BlobClient::AsPageBlobClient() const { return PageBlobClient(*this); }
|
||||
|
||||
BlobClient BlobClient::WithSnapshot(const std::string& snapshot) const
|
||||
{
|
||||
|
||||
@ -123,17 +123,17 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
|
||||
BlockBlobClient BlobContainerClient::GetBlockBlobClient(const std::string& blobName) const
|
||||
{
|
||||
return GetBlobClient(blobName).GetBlockBlobClient();
|
||||
return GetBlobClient(blobName).AsBlockBlobClient();
|
||||
}
|
||||
|
||||
AppendBlobClient BlobContainerClient::GetAppendBlobClient(const std::string& blobName) const
|
||||
{
|
||||
return GetBlobClient(blobName).GetAppendBlobClient();
|
||||
return GetBlobClient(blobName).AsAppendBlobClient();
|
||||
}
|
||||
|
||||
PageBlobClient BlobContainerClient::GetPageBlobClient(const std::string& blobName) const
|
||||
{
|
||||
return GetBlobClient(blobName).GetPageBlobClient();
|
||||
return GetBlobClient(blobName).AsPageBlobClient();
|
||||
}
|
||||
|
||||
Azure::Core::Response<Models::CreateContainerResult> BlobContainerClient::Create(
|
||||
|
||||
@ -135,7 +135,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
builder.AppendPath(Storage::Details::UrlEncodePath(path));
|
||||
auto blobClient = m_blobClient;
|
||||
blobClient.m_blobUrl.AppendPath(Storage::Details::UrlEncodePath(path));
|
||||
auto blockBlobClient = blobClient.GetBlockBlobClient();
|
||||
auto blockBlobClient = blobClient.AsBlockBlobClient();
|
||||
return FileClient(
|
||||
std::move(builder), std::move(blobClient), std::move(blockBlobClient), m_pipeline);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
std::shared_ptr<SharedKeyCredential> credential,
|
||||
const DataLakeClientOptions& options)
|
||||
: PathClient(fileUri, credential, options),
|
||||
m_blockBlobClient(m_blobClient.GetBlockBlobClient())
|
||||
m_blockBlobClient(m_blobClient.AsBlockBlobClient())
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
@ -155,7 +155,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
std::shared_ptr<Identity::ClientSecretCredential> credential,
|
||||
const DataLakeClientOptions& options)
|
||||
: PathClient(fileUri, credential, options),
|
||||
m_blockBlobClient(m_blobClient.GetBlockBlobClient())
|
||||
m_blockBlobClient(m_blobClient.AsBlockBlobClient())
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
@ -183,7 +183,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
}
|
||||
|
||||
FileClient::FileClient(const std::string& fileUri, const DataLakeClientOptions& options)
|
||||
: PathClient(fileUri, options), m_blockBlobClient(m_blobClient.GetBlockBlobClient())
|
||||
: PathClient(fileUri, options), m_blockBlobClient(m_blobClient.AsBlockBlobClient())
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::HttpPolicy>> policies;
|
||||
policies.emplace_back(std::make_unique<Azure::Core::Http::TelemetryPolicy>(
|
||||
|
||||
@ -172,7 +172,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
auto builder = m_dfsUri;
|
||||
builder.AppendPath(Storage::Details::UrlEncodePath(path));
|
||||
auto blobClient = m_blobContainerClient.GetBlobClient(path);
|
||||
auto blockBlobClient = blobClient.GetBlockBlobClient();
|
||||
auto blockBlobClient = blobClient.AsBlockBlobClient();
|
||||
return FileClient(
|
||||
std::move(builder), std::move(blobClient), std::move(blockBlobClient), m_pipeline);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user