.NET Based OPC UA Client/Server SDK  3.3.0.530
UnifiedAutomation.UaServer.SingleThreadSynchronizationContext Class Reference

A synchronization context that runs on a single dedicated thread. More...

Inherits SynchronizationContext.

Public Member Functions

 SingleThreadSynchronizationContext ()
 Creates a new instance. More...
 
override SynchronizationContext CreateCopy ()
 
override void Post (SendOrPostCallback d, object state)
 Queues the callback to be executed on the thread. More...
 
override void Send (SendOrPostCallback d, object state)
 Queues the callback to be executed on the thread and blocks the current thread until the callback execution finished. More...
 
void Start ()
 Starts the execution of the queue. More...
 
void Stop ()
 Stops the execution of the queue More...
 
Task RunAsync (Func< Task > func)
 Runs the given function on the context thread. More...
 

Detailed Description

A synchronization context that runs on a single dedicated thread.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.SingleThreadSynchronizationContext.SingleThreadSynchronizationContext ( )

Creates a new instance.

Member Function Documentation

override void UnifiedAutomation.UaServer.SingleThreadSynchronizationContext.Post ( SendOrPostCallback  d,
object  state 
)

Queues the callback to be executed on the thread.

Parameters
dThe callback.
stateThe state passed to the callback.
Task UnifiedAutomation.UaServer.SingleThreadSynchronizationContext.RunAsync ( Func< Task >  func)

Runs the given function on the context thread.

Parameters
funcThe function to execute.
Returns
A task.
override void UnifiedAutomation.UaServer.SingleThreadSynchronizationContext.Send ( SendOrPostCallback  d,
object  state 
)

Queues the callback to be executed on the thread and blocks the current thread until the callback execution finished.

Parameters
d
state
void UnifiedAutomation.UaServer.SingleThreadSynchronizationContext.Start ( )

Starts the execution of the queue.

void UnifiedAutomation.UaServer.SingleThreadSynchronizationContext.Stop ( )

Stops the execution of the queue


The documentation for this class was generated from the following file: