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
requestPlcRequestThe PlcRequest to manage
processAction<T>The Action<T> to be executed on completion of
requesttokenCancellationTokenThe optional CancellationToken can be passed
Returns
Type Parameters
TThe 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
requestPlcRequestThe PlcRequest to manage
processAction<T>The Action<T> to be executed on completion of
request
Type Parameters
TThe Type asociated to the PlcRequest passed from
request