xtd 0.2.0
do_work_event_args.h
Go to the documentation of this file.
1 #pragma once
5 #include "cancel_event_args.h"
6 #include <xtd/any>
7 #include <cstdint>
8 
10 namespace xtd {
12  namespace forms {
22  public:
25  do_work_event_args& operator =(const do_work_event_args& do_work_event_args) = default;
27 
29 
33  explicit do_work_event_args(const std::any& argument) : argument_(argument) {}
35 
37 
41  std::any argument() const noexcept {return argument_;}
42 
45  std::any result() const noexcept {return result_;}
48  void result(std::any value) {result_ = value;}
50 
51  private:
52  std::any argument_;
53  std::any result_;
54  };
55  }
56 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
std::any result() const noexcept
Gets a value that represents the result of an asynchronous operation.
Definition: do_work_event_args.h:45
Contains xtd::forms::cancel_event_args event args.
void result(std::any value)
Sets a value that represents the result of an asynchronous operation.
Definition: do_work_event_args.h:48
std::any argument() const noexcept
Gets a value that represents the argument of an asynchronous operation.
Definition: do_work_event_args.h:41
Provides data for the xtd::forms::background_worker::do_work event handler.
Definition: do_work_event_args.h:21
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Provides data for a cancelable event.
Definition: cancel_event_args.h:20
do_work_event_args(const std::any &argument)
Initializes a new instance of the DoWorkEventArgs class.
Definition: do_work_event_args.h:33