예제 #1
0
    pplx::task<bool> cloud_queue::delete_queue_if_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 delete_async_impl(options, context, /* allow_not_found */ true);
        });
    }
    pplx::task<bool> cloud_table::delete_table_if_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->delete_async_impl(options, context, /* allow_not_found */ true);
        });
    }
예제 #3
0
 pplx::task<void> cloud_queue::delete_queue_async(const queue_request_options& options, operation_context context)
 {
     return delete_async_impl(options, context, /* allow_not_found */ false).then([] (bool)
     {
     });
 }