Skip to content

Method ExecuteMethod<T>

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

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

Executes a method with attribute-based behavior using AttributeHandler.

csharp
public Task<T> ExecuteMethod<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.

ExecuteMethod(MethodInfo, object[], CancellationToken)

Executes a method without return value using AttributeHandler.

csharp
public Task ExecuteMethod(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.