xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
do_work_event_args.h
Go to the documentation of this file.
1 #pragma once
5 #include <any>
6 #include <cstdint>
7 #include "cancel_event_args.h"
8 
10 namespace xtd {
12  namespace forms {
20  public:
23  do_work_event_args& operator=(const do_work_event_args& do_work_event_args) = default;
25 
28  do_work_event_args(const std::any& argument) : argument_(argument) {}
29 
32  std::any argument() const {return argument_;}
33 
36  std::any result() const {return result_;}
39  void result(std::any value) {result_ = value;}
40 
41  private:
42  std::any argument_;
43  std::any result_;
44  };
45  }
46 }
Contains xtd::forms::cancel_event_args event args.
Provides data for a cancelable event.
Definition: cancel_event_args.h:19
Provides data for the do_work event handler.
Definition: do_work_event_args.h:19
std::any argument() const
Gets a value that represents the argument of an asynchronous operation.
Definition: do_work_event_args.h:32
std::any result() const
Gets a value that represents the result of an asynchronous operation.
Definition: do_work_event_args.h:36
do_work_event_args(const std::any &argument)
Initializes a new instance of the DoWorkEventArgs class.
Definition: do_work_event_args.h:28
void result(std::any value)
Sets a value that represents the result of an asynchronous operation.
Definition: do_work_event_args.h:39
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17