Skip to main content Skip to complementary content
Close announcements banner

AwaitResponse Method

Overloads

AwaitResponse<T>(Task<T>, String, CancellationToken)

Await the arrival of a response for a method call to the engine.

AwaitResponse(Task, String, CancellationToken)

Await the arrival of a response for a method call to the engine.

AwaitResponse<T>(Task<T>, String, CancellationToken)

Await the arrival of a response for a method call to the engine.

Declaration

      public static T AwaitResponse<T>(Task<T> task, string methodName, CancellationToken cancellationToken)
    

Parameters

Type Name Description
System.Threading.Tasks.Task<T> task

The task returned by a call to SendAsync.

System.String methodName

The name of the method that the task corresponds to.

System.Threading.CancellationToken cancellationToken

The token used to synchronize shutdown events.

Returns

Type Description
T

The value returned by the task.

Type Parameters

Name Description
T

The return type of the method.

Exceptions

Type Condition
System.TimeoutException

Throws a timeout exception if a response has not been received within the current timeout.

AwaitResponse(Task, String, CancellationToken)

Await the arrival of a response for a method call to the engine.

Declaration

      public static void AwaitResponse(Task task, string methodName, CancellationToken cancellationToken)
    

Parameters

Type Name Description
System.Threading.Tasks.Task task

The task returned by a call to SendAsync.

System.String methodName

The name of the method that the task corresponds to.

System.Threading.CancellationToken cancellationToken

The token used to synchronize shutdown events.

Exceptions

Type Condition
System.TimeoutException

Throws a timeout exception if a response has not been received within the current timeout.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!