Fix doxygen comments for Operation<T> (#1210)
This commit is contained in:
parent
8aac9091c2
commit
60e70a3695
@ -96,9 +96,9 @@ namespace Azure { namespace Core {
|
||||
std::unique_ptr<Http::RawResponse> Poll(Context& context) { return PollInternal(context); }
|
||||
|
||||
/**
|
||||
* @brief Periodically calls the server till the long-running operation completes;
|
||||
* @brief Periodically calls the server till the long-running operation completes.
|
||||
*
|
||||
* @param period Time in milliseconds to wait between polls
|
||||
* @param period Time in milliseconds to wait between polls.
|
||||
*
|
||||
* @return Response<T> the final result of the long-running operation.
|
||||
*/
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Valid states for long-running Operations. Services can extend upon the default set of
|
||||
* @brief Valid states for long-running Operations. Services can extend upon the default set of
|
||||
* values.
|
||||
*/
|
||||
|
||||
@ -24,28 +24,28 @@ namespace Azure { namespace Core {
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a #OperationStatus with \p value.
|
||||
* @brief Construct an #OperationStatus with \p value.
|
||||
*
|
||||
* @param value A non-absent value to initialize with.
|
||||
* @param value The value to initialize with.
|
||||
*/
|
||||
explicit OperationStatus(const std::string& value) : m_value(value) {}
|
||||
/**
|
||||
* @brief Construct a #OperationStatus with \p value.
|
||||
* @brief Construct an #OperationStatus with \p value.
|
||||
*
|
||||
* @param value A non-absent value to initialize with.
|
||||
* @param value The value to initialize with.
|
||||
*/
|
||||
explicit OperationStatus(std::string&& value) : m_value(std::move(value)) {}
|
||||
/**
|
||||
* @brief Construct a #OperationStatus with \p value.
|
||||
* @brief Construct an #OperationStatus with \p value.
|
||||
*
|
||||
* @param value A non-absent value to initialize with.
|
||||
* @param value The value to initialize with.
|
||||
*/
|
||||
explicit OperationStatus(const char* value) : m_value(value) {}
|
||||
|
||||
/**
|
||||
* @brief Compare two #OperationStatus objects
|
||||
* @brief Compare two #OperationStatus objects for equality.
|
||||
*
|
||||
* @param other A #OperationStatus to compare with.
|
||||
* @param other An #OperationStatus to compare with.
|
||||
*
|
||||
* @return `true` if the states have the same string representation. `false` otherwise.
|
||||
*/
|
||||
@ -55,7 +55,7 @@ namespace Azure { namespace Core {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Compare two #OperationStatus objects
|
||||
* @brief Compare two #OperationStatus objects for equality.
|
||||
*
|
||||
* @param other A #OperationStatus to compare with.
|
||||
*
|
||||
@ -64,14 +64,29 @@ namespace Azure { namespace Core {
|
||||
bool operator!=(const OperationStatus& other) const noexcept { return !(*this == other); }
|
||||
|
||||
/**
|
||||
* @brief The std::string representation of the value
|
||||
* @brief The std::string representation of the operation status.
|
||||
*/
|
||||
const std::string& Get() const noexcept { return m_value; }
|
||||
|
||||
/**
|
||||
* @brief The #Operation is Not Started.
|
||||
*/
|
||||
static const OperationStatus NotStarted;
|
||||
/**
|
||||
* @brief The #Operation is Running.
|
||||
*/
|
||||
static const OperationStatus Running;
|
||||
/**
|
||||
* @brief The #Operation Succeeded.
|
||||
*/
|
||||
static const OperationStatus Succeeded;
|
||||
/**
|
||||
* @brief The #Operation was Cancelled.
|
||||
*/
|
||||
static const OperationStatus Cancelled;
|
||||
/**
|
||||
* @brief The #Operation Failed.
|
||||
*/
|
||||
static const OperationStatus Failed;
|
||||
};
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ add_executable (
|
||||
operation.cpp
|
||||
operation_status.cpp
|
||||
pipeline.cpp
|
||||
policy.cpp
|
||||
policy.cpp
|
||||
simplified_header.cpp
|
||||
string.cpp
|
||||
telemetry_policy.cpp
|
||||
|
||||
@ -34,7 +34,7 @@ TEST(Operation, Poll)
|
||||
EXPECT_TRUE(operation.HasValue());
|
||||
|
||||
auto result = operation.Value();
|
||||
EXPECT_TRUE(result == "StringOperation-Completed");
|
||||
EXPECT_EQ(result, "StringOperation-Completed");
|
||||
}
|
||||
|
||||
TEST(Operation, PollUntilDone)
|
||||
|
||||
@ -48,4 +48,9 @@ TEST(OperationStatus, Custom)
|
||||
OperationStatus status4 = OperationStatus(std::string("CustomValue"));
|
||||
EXPECT_EQ(status4.Get(), "CustomValue");
|
||||
EXPECT_NE(status4, OperationStatus::NotStarted);
|
||||
|
||||
EXPECT_EQ(status1, status2);
|
||||
EXPECT_EQ(status2, status3);
|
||||
EXPECT_EQ(status3, status4);
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user