Azure::*::_detail::Version => Azure::*::PackageVersion (#1839)

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
Anton Kolesnyk 2021-03-10 15:15:28 -08:00 committed by GitHub
parent 76870c4414
commit 48258f8f81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 72 additions and 65 deletions

View File

@ -15,7 +15,7 @@
- Renamed `NoRevoke` to `EnableCertificateRevocationListCheck` for `Azure::Core::Http::CurlTransportSSLOptions`.
- Renamed `GetString()` to `ToString()` in `Azure::Core::DateTime`.
- Renamed `GetUuidString()` to `ToString()` in `Azure::Core::Uuid`.
- Moved `Version` from `Azure::Core::Details` to `Azure::Core`.
- Renamed `Azure::Core::Details::Version` to `Azure::Core::PackageVersion`.
- Moved `BodyStream` and its derived types from `Azure::Core::Http` namespace to `Azure::IO`, and moved the `body_stream.hpp` header from `azure/core/http` to `azure/core/io`.
- Moved `NullBodyStream` to internal usage only. It is not meant for public use.
- Removed `LimitBodyStream`.

View File

@ -22,7 +22,7 @@ namespace Azure { namespace Core {
/**
* @brief Provides version information.
*/
class Version {
class PackageVersion {
public:
/// Major numeric identifier.
static constexpr int Major = AZURE_CORE_VERSION_MAJOR;

View File

@ -8,19 +8,19 @@
using namespace Azure::Core;
const std::string Version::PreRelease = secret;
const std::string PackageVersion::PreRelease = secret;
std::string Version::VersionString()
std::string PackageVersion::VersionString()
{
static const std::string versionString = [] {
std::string version;
std::stringstream ss;
std::string dot = ".";
ss << Version::Major << dot << Version::Minor << dot << Version::Patch;
ss << PackageVersion::Major << dot << PackageVersion::Minor << dot << PackageVersion::Patch;
if (!Version::PreRelease.empty())
ss << "-" << Version::PreRelease;
if (!PackageVersion::PreRelease.empty())
ss << "-" << PackageVersion::PreRelease;
return ss.str();
}();

View File

@ -44,7 +44,7 @@ TEST(SimplifiedHeader, core)
EXPECT_NO_THROW(Azure::Core::Uuid::CreateUuid());
EXPECT_NO_THROW(Azure::Core::RequestFailedException("foo"));
EXPECT_NO_THROW(Azure::Core::OperationStatus("foo"));
EXPECT_NO_THROW(Azure::Core::Version::VersionString());
EXPECT_NO_THROW(Azure::Core::PackageVersion::VersionString());
{
std::vector<uint8_t> buffer(10);

View File

@ -5,6 +5,7 @@
### Breaking Changes
- Removed `TransportPolicyOptions` from `ClientSecretCredentialOptions`. Updated the options to derive from ClientOptions.
- Renamed `Azure::Identity::Details::Version` to `Azure::Identity::PackageVersion`.
## 1.0.0-beta.3 (2021-02-02)

View File

@ -17,12 +17,12 @@
#define AZURE_IDENTITY_VERSION_PATCH 0
#define AZURE_IDENTITY_VERSION_PRERELEASE "beta.4"
namespace Azure { namespace Identity { namespace _detail {
namespace Azure { namespace Identity {
/**
* @brief Provides version information.
*/
class Version {
class PackageVersion {
public:
/// Major numeric identifier.
static constexpr int Major = AZURE_IDENTITY_VERSION_MAJOR;
@ -48,7 +48,7 @@ namespace Azure { namespace Identity { namespace _detail {
static constexpr char const* secret = AZURE_IDENTITY_VERSION_PRERELEASE;
};
}}} // namespace Azure::Identity::_detail
}} // namespace Azure::Identity
#undef AZURE_IDENTITY_VERSION_MAJOR
#undef AZURE_IDENTITY_VERSION_MINOR

View File

@ -6,21 +6,21 @@
#include <sstream>
#include <string>
using namespace Azure::Identity::_detail;
using namespace Azure::Identity;
std::string const Version::PreRelease = secret;
std::string const PackageVersion::PreRelease = secret;
std::string Version::VersionString()
std::string PackageVersion::VersionString()
{
static const std::string versionString = [] {
std::string version;
std::stringstream ss;
std::string dot = ".";
ss << Version::Major << dot << Version::Minor << dot << Version::Patch;
ss << PackageVersion::Major << dot << PackageVersion::Minor << dot << PackageVersion::Patch;
if (!Version::PreRelease.empty())
ss << "-" << Version::PreRelease;
if (!PackageVersion::PreRelease.empty())
ss << "-" << PackageVersion::PreRelease;
return ss.str();
}();

View File

@ -19,5 +19,5 @@ TEST(SimplifiedHeader, identity)
{
EXPECT_NO_THROW(Azure::Identity::ClientSecretCredential clientSecretCredential("", "", ""));
EXPECT_NO_THROW(Azure::Identity::EnvironmentCredential environmentCredential);
EXPECT_NO_THROW(Azure::Identity::_detail::Version::VersionString());
EXPECT_NO_THROW(Azure::Identity::PackageVersion::VersionString());
}

View File

@ -19,7 +19,7 @@
namespace Azure { namespace Security { namespace KeyVault { namespace Common {
class Version {
class PackageVersion {
public:
static constexpr int Major = AZURE_SECURITY_KEYVAULT_COMMON_VERSION_MAJOR;
static constexpr int Minor = AZURE_SECURITY_KEYVAULT_COMMON_VERSION_MINOR;

View File

@ -19,7 +19,7 @@
namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
class Version {
class PackageVersion {
public:
static constexpr int Major = AZURE_SECURITY_KEYVAULT_KEYS_VERSION_MAJOR;
static constexpr int Minor = AZURE_SECURITY_KEYVAULT_KEYS_VERSION_MINOR;

View File

@ -11,6 +11,7 @@
- Changed the return type of `StartCopyFromUri` and `StartCopyIncremental` API from a `Response<T>` to the particular `Operation<T>` type called `StartCopyBlobOperation` directly.
- String conversion functions of extensible enums were renamed from `Get()` to `ToString()`.
- Moved `SecondaryHostForRetryReads` out of retry options, now it's under `BlobClientOptions`.
- Renamed `Azure::Storage::Blobs::Details::Version` to `Azure::Storage::Blobs::PackageVersion`.
### Other Changes and Improvements

View File

@ -16,12 +16,12 @@
#define AZURE_STORAGE_BLOBS_VERSION_PATCH 0
#define AZURE_STORAGE_BLOBS_VERSION_PRERELEASE "beta.9"
namespace Azure { namespace Storage { namespace Blobs { namespace _detail {
namespace Azure { namespace Storage { namespace Blobs {
/**
* @brief Provides version information.
*/
struct Version
struct PackageVersion
{
public:
/// Major numeric identifier.
@ -53,7 +53,7 @@ namespace Azure { namespace Storage { namespace Blobs { namespace _detail {
}
};
}}}} // namespace Azure::Storage::Blobs::_detail
}}} // namespace Azure::Storage::Blobs
#undef AZURE_STORAGE_BLOBS_VERSION_MAJOR
#undef AZURE_STORAGE_BLOBS_VERSION_MINOR

View File

@ -66,7 +66,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -99,7 +99,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -123,7 +123,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -62,7 +62,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -95,7 +95,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -121,7 +121,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -57,7 +57,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -90,7 +90,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -116,7 +116,7 @@ namespace Azure { namespace Storage { namespace Blobs {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -2,6 +2,9 @@
## 12.0.0-beta.9 (Unreleased)
### Breaking Changes
- Renamed `Azure::Storage::Common::Details::Version` to `Azure::Storage::Common::PackageVersion`.
## 12.0.0-beta.8 (2021-02-12)

View File

@ -16,12 +16,12 @@
#define AZURE_STORAGE_COMMON_VERSION_PATCH 0
#define AZURE_STORAGE_COMMON_VERSION_PRERELEASE "beta.9"
namespace Azure { namespace Storage { namespace Common { namespace _detail {
namespace Azure { namespace Storage { namespace Common {
/**
* @brief Provides version information.
*/
struct Version
struct PackageVersion
{
public:
/// Major numeric identifier.
@ -53,7 +53,7 @@ namespace Azure { namespace Storage { namespace Common { namespace _detail {
}
};
}}}} // namespace Azure::Storage::Common::_detail
}}} // namespace Azure::Storage::Common
#undef AZURE_STORAGE_COMMON_VERSION_MAJOR
#undef AZURE_STORAGE_COMMON_VERSION_MINOR

View File

@ -11,6 +11,7 @@
- DataLake client constructors won't automatically convert blob url to dfs url anymore.
- String conversion functions of extensible enums were renamed from `Get()` to `ToString()`.
- Moved `SecondaryHostForRetryReads` out of retry options, now it's under `DataLakeClientOptions`.
- Renamed `Azure::Storage::Files::DataLake::Details::Version` to `Azure::Storage::Files::DataLake::PackageVersion`.
## 12.0.0-beta.8 (2021-02-12)

View File

@ -16,12 +16,12 @@
#define AZURE_STORAGE_FILES_DATALAKE_VERSION_PATCH 0
#define AZURE_STORAGE_FILES_DATALAKE_VERSION_PRERELEASE "beta.9"
namespace Azure { namespace Storage { namespace Files { namespace DataLake { namespace _detail {
namespace Azure { namespace Storage { namespace Files { namespace DataLake {
/**
* @brief Provides version information.
*/
struct Version
struct PackageVersion
{
public:
/// Major numeric identifier.
@ -53,7 +53,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam
}
};
}}}}} // namespace Azure::Storage::Files::DataLake::_detail
}}}} // namespace Azure::Storage::Files::DataLake
#undef AZURE_STORAGE_FILES_DATALAKE_VERSION_MAJOR
#undef AZURE_STORAGE_FILES_DATALAKE_VERSION_MINOR

View File

@ -69,7 +69,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -105,7 +105,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -132,7 +132,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -107,7 +107,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -143,7 +143,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -169,7 +169,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -110,7 +110,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -146,7 +146,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -173,7 +173,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -10,6 +10,7 @@
- Changed the return type of `StartCopy` API from a `Response<T>` to the particular `Operation<T>` type called `StartCopyShareFileOperation` directly.
- String conversion functions of extensible enums were renamed from `Get()` to `ToString()`.
- Renamed `Azure::Storage::Files::Shares::Details::Version` to `Azure::Storage::Files::Shares::PackageVersion`.
## 12.0.0-beta.8 (2021-02-12)

View File

@ -16,12 +16,12 @@
#define AZURE_STORAGE_FILES_SHARES_VERSION_PATCH 0
#define AZURE_STORAGE_FILES_SHARES_VERSION_PRERELEASE "beta.9"
namespace Azure { namespace Storage { namespace Files { namespace Shares { namespace _detail {
namespace Azure { namespace Storage { namespace Files { namespace Shares {
/**
* @brief Provides version information.
*/
struct Version
struct PackageVersion
{
public:
/// Major numeric identifier.
@ -53,7 +53,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { names
}
};
}}}}} // namespace Azure::Storage::Files::Shares::_detail
}}}} // namespace Azure::Storage::Files::Shares
#undef AZURE_STORAGE_FILES_SHARES_VERSION_MAJOR
#undef AZURE_STORAGE_FILES_SHARES_VERSION_MINOR

View File

@ -58,7 +58,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -78,7 +78,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -60,7 +60,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -82,7 +82,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -64,7 +64,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -86,7 +86,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -55,7 +55,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
newOptions,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}
@ -77,7 +77,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
Storage::_detail::FileServicePackageName,
_detail::Version::VersionString(),
PackageVersion::VersionString(),
std::move(perRetryPolicies),
std::move(perOperationPolicies));
}

View File

@ -17,7 +17,7 @@ namespace Azure { namespace Template {
/**
* @brief Provides version information.
*/
class Version {
class PackageVersion {
public:
/// Major numeric identifier.
static constexpr int Major = AZURE_TEMPLATE_VERSION_MAJOR;

View File

@ -8,4 +8,4 @@
using namespace Azure::Template;
std::string const TemplateClient::ClientVersion() { return Version::VersionString(); }
std::string const TemplateClient::ClientVersion() { return PackageVersion::VersionString(); }

View File

@ -7,19 +7,19 @@
using namespace Azure::Template;
const std::string Version::PreRelease = secret;
const std::string PackageVersion::PreRelease = secret;
std::string Version::VersionString()
std::string PackageVersion::VersionString()
{
static const std::string versionString = [] {
std::string version;
std::stringstream ss;
std::string dot = ".";
ss << Version::Major << dot << Version::Minor << dot << Version::Patch;
ss << PackageVersion::Major << dot << PackageVersion::Minor << dot << PackageVersion::Patch;
if (!Version::PreRelease.empty())
ss << "-" << Version::PreRelease;
if (!PackageVersion::PreRelease.empty())
ss << "-" << PackageVersion::PreRelease;
return ss.str();
}();