xtd 1.0.0
Loading...
Searching...
No Matches
run_worker_completed_event_args.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/any>
6#include <xtd/event_args>
7#include <xtd/optional>
8#include <cstdint>
9
11namespace xtd {
13 namespace forms {
25 public:
27
33
35
39 [[nodiscard]] bool cancel() const noexcept {return cancel_;}
43 cancel_ = value;
44 return *this;
45 }
46
49 [[nodiscard]] xtd::any_object user_state() const noexcept {return user_state_;}
50
53 [[nodiscard]] xtd::any_object result() const noexcept {return result_;}
55
56 private:
57 bool cancel_ = false;
58 std::optional<xtd::ref<std::exception>> exception_;
59 xtd::any_object result_;
60 xtd::any_object user_state_;
61 };
62 }
63}
Represent a polymorphic wrapper capable of holding any type.
Definition any_object.hpp:29
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Defines the base class for predefined exceptions in the xtd namespace.
Definition exception.hpp:29
run_worker_completed_event_args(const xtd::any_object &result, std::optional< xtd::ref< std::exception > > exception, bool cancel)
Initializes a new instance of the xtd::forms::run_worker_completed_event_args class.
Definition run_worker_completed_event_args.hpp:31
bool cancel() const noexcept
Gets a value indicates the asynchronus operation is canceled.
Definition run_worker_completed_event_args.hpp:39
xtd::any_object user_state() const noexcept
Gets a value that represents the argument of an asynchronous operation.
Definition run_worker_completed_event_args.hpp:49
xtd::any_object result() const noexcept
Definition run_worker_completed_event_args.hpp:53
run_worker_completed_event_args & cancel(bool value)
Sets a value indicates the asynchronus operation is canceled.
Definition run_worker_completed_event_args.hpp:42
xtd::reference_wrapper_object< type_t > ref
The xtd::ref object is a reference wrapper.
Definition ref.hpp:25
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8