Method CancelWith
- Namespace
- MaaFramework.Binding
- Assembly
- MaaFramework.Binding.Native.dll
CancelWith(CancellationToken, Func<bool>?, Task<bool>?, MaaJob?)
Cancels the agent operation with a specified token.
public bool CancelWith(CancellationToken cancellationToken, Func<bool>? waitFunc = null, Task<bool>? waitTask = null, MaaJob? waitJob = null)Parameters
cancellationTokenCancellationToken-
The token used to cancel the waiting operation.
waitFuncFunc<bool>?-
The func that needs to be canceled.
waitTaskTask<bool>?-
The task that needs to be canceled.
waitJobMaaJob?-
The job that needs to be canceled.
Returns
- bool
-
The return value of
waitFuncANDwaitTask.Result ANDwaitJob.IsSucceeded().
Remarks
Wrapper of MaaFramework.Binding.Interop.Native.MaaAgentClient.MaaAgentClientSetTimeout(System.IntPtr,System.Int64).