Table of Contents

Class PLCOnNetExtensions

Namespace
MASES.PLCOnNet.Specific
Assembly
MASES.PLCOnNet.dll

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 PlcRequest

The PlcRequest to manage

process Action<T>

The Action<T> to be executed on completion of request

token CancellationToken

The optional CancellationToken can be passed

Returns

Task

The Task of the async pattern

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 PlcRequest

The 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