Provides a way to synchronously or asynchronously execute a delegate.
Public Properties | |
virtual bool | invoke_required () const noexcept=0 |
Gets a value indicating whether the caller must call Invoke(Delegate, Object[]) when calling an object that implements this interface. | |
Public Methods | |
virtual xtd::async_result | begin_invoke (delegate< void()> method)=0 |
Asynchronously executes the delegate on the thread that created this object. | |
virtual xtd::async_result | begin_invoke (delegate< void(std::vector< std::any >)> value, const std::vector< std::any > &args)=0 |
Asynchronously executes the delegate on the thread that created this object. | |
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, and then returns the value generated by the process. | |
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 the creating thread. | |
virtual std::optional< object_ref > | invoke (delegate< void(std::vector< std::any >)> method, const std::vector< std::any > &args)=0 |
Synchronously executes the delegate on the thread that created this object and marshals the call to the creating thread. | |
virtual std::optional< object_ref > | invoke (delegate< void(std::vector< std::any >)> method, std::any arg)=0 |
Synchronously executes the delegate on the thread that created this object and marshals the call to the creating thread. | |
|
pure virtualnoexcept |
Gets a value indicating whether the caller must call Invoke(Delegate, Object[]) when calling an object that implements this interface.
Implemented in xtd::forms::control.
|
pure virtual |
Asynchronously executes the delegate on the thread that created this object.
method | A xtd::delegate to a method without paramter. |
Implemented in xtd::forms::control, and xtd::forms::control.
|
pure virtual |
Asynchronously executes the delegate on the thread that created this object.
method | A xtd::delegate to a method that takes parameters of the same number and type that are contained in args. |
args | An array of type Object to pass as arguments to the given method. This can be empty if no arguments are needed. |
Implemented in xtd::forms::control, and xtd::forms::control.
|
pure virtual |
Waits until the process started by calling xtd::isynchronize_invoke::begin_invoke completes, and then returns the value generated by the process.
async | An xtd::iasync_result interface that represents the asynchronous operation started by calling xtd::isynchronize_invoke::begin_invoke. |
Implemented in xtd::forms::control.
|
pure virtual |
Synchronously executes the delegate on the thread that created this object and marshals the call to the creating thread.
method | A xtd::delegate that contains a method to call, in the context of the thread for the control. |
Implemented in xtd::forms::control, and xtd::forms::control.
|
pure virtual |
Synchronously executes the delegate on the thread that created this object and marshals the call to the creating thread.
method | A xtd::delegate that contains a method to call, in the context of the thread for the control. |
args | An array of type xtd::object that represents the arguments to pass to the given method. This can be empty if no arguments are needed. |
Implemented in xtd::forms::control, and xtd::forms::control.
|
pure virtual |
Synchronously executes the delegate on the thread that created this object and marshals the call to the creating thread.
method | A xtd::delegate that contains a method to call, in the context of the thread for the control. |
arg | An xtd::object that represents the argument to pass to the given method. |
Implemented in xtd::forms::control, and xtd::forms::control.