Skip to content

Method ExecuteAsync<T>

Namespace: Belay.Core
Assembly: Belay.Core.dll

ExecuteAsync<T>(MethodInfo, object[], CancellationToken)

Executes a method with return value using AttributeHandler.

csharp
public Task<T> ExecuteAsync<T>(MethodInfo method, object[] args, CancellationToken cancellationToken = default)

Parameters

method MethodInfo

The method to execute.

args object[]

The method arguments.

cancellationToken CancellationToken

Cancellation token for the operation.

Returns

Task<T>

The result of the method execution.

Type Parameters

T

The return type of the method.

ExecuteAsync(MethodInfo, object[], CancellationToken)

Executes a method without return value using AttributeHandler.

csharp
public Task ExecuteAsync(MethodInfo method, object[] args, CancellationToken cancellationToken = default)

Parameters

method MethodInfo

The method to execute.

args object[]

The method arguments.

cancellationToken CancellationToken

Cancellation token for the operation.

Returns

Task

Released under the Apache License 2.0.