SQL Tools Service
Show / Hide Table of Contents
Improve this Doc View Source

Class AsyncContext

Simplifies the setup of a SynchronizationContext for the use of async calls in the current thread.

Inheritance
System.Object
AsyncContext
Namespace:Microsoft.SqlTools.ServiceLayer.Utility
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public static class AsyncContext

Methods

| Improve this Doc View Source

Start(Func<Task>)

Starts a new ThreadSynchronizationContext, attaches it to the thread, and then runs the given async main function.

Declaration
public static void Start(Func<Task> asyncMainFunc)
Parameters
Type Name Description
System.Func<System.Threading.Tasks.Task> asyncMainFunc

The Task-returning Func which represents the "main" function for the thread.

  • Improve this Doc
  • View Source
In This Article
  • Methods
    • Start(Func<Task>)

© Microsoft  //  Generated with DocFX