JoinableTaskContext Constructor
Initializes a new instance of the JoinableTaskContext.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Sub New ( _
mainThread As Thread, _
synchronizationContext As SynchronizationContext _
)
public JoinableTaskContext(
Thread mainThread,
SynchronizationContext synchronizationContext
)
public:
JoinableTaskContext(
Thread^ mainThread,
SynchronizationContext^ synchronizationContext
)
new :
mainThread:Thread *
synchronizationContext:SynchronizationContext -> JoinableTaskContext
public function JoinableTaskContext(
mainThread : Thread,
synchronizationContext : SynchronizationContext
)
Parameters
mainThread
Type: System.Threading.ThreadThe thread to switch to in SwitchToMainThreadAsync.
synchronizationContext
Type: System.Threading.SynchronizationContextThe synchronization context to use to switch to the main thread.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.