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

Class ThreadSynchronizationContext

Provides a SynchronizationContext implementation that can be used in console applications or any thread which doesn't have its own SynchronizationContext.

Inheritance
System.Object
System.Threading.SynchronizationContext
ThreadSynchronizationContext
Namespace:Microsoft.SqlTools.ServiceLayer.Utility
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public class ThreadSynchronizationContext : SynchronizationContext

Methods

| Improve this Doc View Source

EndLoop()

Ends the SynchronizationContext message loop.

Declaration
public void EndLoop()
| Improve this Doc View Source

Post(SendOrPostCallback, Object)

Posts a request for execution to the SynchronizationContext. This will be executed on the SynchronizationContext's thread.

Declaration
public override void Post(SendOrPostCallback callback, object state)
Parameters
Type Name Description
System.Threading.SendOrPostCallback callback

The callback to be invoked on the SynchronizationContext's thread.

System.Object state

A state object to pass along to the callback when executed through the SynchronizationContext.

| Improve this Doc View Source

RunLoopOnCurrentThread()

Starts the SynchronizationContext message loop on the current thread.

Declaration
public void RunLoopOnCurrentThread()
  • Improve this Doc
  • View Source

© Microsoft  //  Generated with DocFX