pplx::task<void> cloud_queue::create_async(const queue_request_options& options, operation_context context) { return create_async_impl(options, context, /* allow_conflict */ false).then([] (bool) { // TODO: Consider making it an error or otherwise communicating it to the caller when this call succeeds because the queue already exists with the same metadata }); }
pplx::task<bool> cloud_queue::create_if_not_exists_async(const queue_request_options& options, operation_context context) { return exists_async_impl(options, context, /* allow_secondary */ false).then([this, options, context] (bool exists) -> pplx::task<bool> { if (exists) { return pplx::task_from_result(false); } return create_async_impl(options, context, /* allow_conflict */ true); }); }
pplx::task<bool> cloud_table::create_if_not_exists_async(const table_request_options& options, operation_context context) { auto instance = std::make_shared<cloud_table>(*this); return exists_async_impl(options, context, /* allow_secondary */ false).then([instance, options, context] (bool exists) -> pplx::task<bool> { if (exists) { return pplx::task_from_result(false); } return instance->create_async_impl(options, context, /* allow_conflict */ true); }); }
pplx::task<void> cloud_table::create_async(const table_request_options& options, operation_context context) { return create_async_impl(options, context, /* allow_conflict */ false).then([] (bool) { }); }