Domain Detective

API Reference

Class

TaskExtensions

Namespace DnsClientX

Provides helper methods to execute asynchronous tasks synchronously.

Inheritance

  • Object
  • TaskExtensions

Methods

RunSync 2 overloads
RunSync(System.Threading.Tasks.Task task) #

Blocks the calling thread until the given Task completes.

Parameters

task System.Threading.Tasks.Task required
Task to wait for.
RunSync(System.Func{System.Threading.Tasks.Task} func) #

Executes the provided asynchronous delegate synchronously.

Parameters

func System.Func{System.Threading.Tasks.Task} required
Asynchronous delegate to invoke.

Returns

A task representing the completion of func.

RunSync``1 2 overloads
RunSync``1(System.Threading.Tasks.Task{``0} task) #

Blocks the calling thread until the Task completes and returns its result.

Type Parameters

T
Type of the task result.

Parameters

task System.Threading.Tasks.Task{``0} required
Task to wait for.

Returns

Result of the completed task.

RunSync``1(System.Func{System.Threading.Tasks.Task{``0}} func) #

Executes the provided asynchronous delegate synchronously and returns its result.

Type Parameters

T
Type of the task result.

Parameters

func System.Func{System.Threading.Tasks.Task{``0}} required
Asynchronous delegate to invoke.

Returns

Result returned by the delegate.

{{ include "footer" }}