Class PLCOnNetExtensions
Extensions associated with CompletableFuture<T>
public static class PLCOnNetExtensions
- Inheritance
-
PLCOnNetExtensions
- Inherited Members
Methods
RequestAsync<T>(PlcRequest, Action<T>, CancellationToken)
Execute the process
on completion of request
using the CancellationToken passed from token
public static Task RequestAsync<T>(this PlcRequest request, Action<T> process, CancellationToken token = default) where T : PlcResponse
Parameters
request
PlcRequestThe PlcRequest to manage
process
Action<T>The Action<T> to be executed on completion of
request
token
CancellationTokenThe optional CancellationToken can be passed
Returns
Type Parameters
T
The Type asociated to the PlcRequest passed from
request
Request<T>(PlcRequest, Action<T>)
Execute the process
on completion of request
public static void Request<T>(this PlcRequest request, Action<T> process) where T : PlcResponse
Parameters
request
PlcRequestThe PlcRequest to manage
process
Action<T>The Action<T> to be executed on completion of
request
Type Parameters
T
The Type asociated to the PlcRequest passed from
request