65 virtual std::optional<object_ref>
invoke(delegate<
void()> value) = 0;
72 virtual std::optional<object_ref>
invoke(delegate<
void(std::vector<std::any>)> method,
const std::vector<std::any>& args) = 0;
79 virtual std::optional<object_ref>
invoke(delegate<
void(std::vector<std::any>)> method,
std::any arg) = 0;
83 template<
typename delegate_t>
86 template<
typename delegate_t>
89 template<
typename delegate_t>
90 void invoke(delegate_t value,
const std::vector<std::any>& args) {
invoke(delegate<
void(std::vector<std::any>)>(value), args);}
92 template<
typename delegate_t,
typename args_t>
93 void invoke(delegate_t value, args_t args) {
invoke(delegate<
void(std::vector<std::any>)>(value),
std::any(args));}
95 template<
typename delegate_t>
96 void invoke(delegate_t value) {
invoke(delegate<
void(std::vector<std::any>)>(value), std::vector<std::any> {});}
virtual std::optional< object_ref > end_invoke(xtd::async_result async)=0
Waits until the process started by calling xtd::isynchronize_invoke::begin_invoke completes...
Contains xtd::delegate delegate.
virtual bool invoke_required() const noexcept=0
Gets a value indicating whether the caller must call Invoke(Delegate, Object[]) when calling an objec...
Provides a way to synchronously or asynchronously execute a delegate.
Definition: isynchronize_invoke.h:26
virtual std::optional< object_ref > invoke(delegate< void()> value)=0
Synchronously executes the delegate on the thread that created this object and marshals the call to t...
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
std::shared_ptr< xtd::iasync_result > async_result
Represents the status of an asynchronous operation.
Definition: async_result.h:16
virtual xtd::async_result begin_invoke(delegate< void()> method)=0
Asynchronously executes the delegate on the thread that created this object.
Contains xtd::interface interface.
Contains xtd::object_ref alias.
#define interface_
This keyword is use to represent an interface.
Definition: interface.h:54
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
Contains xtd::async_result alias.