Class StaSynchronizationContext
A synchronization context running in a STA thread.
Inheritance
System.Object
System.Threading.SynchronizationContext
StaSynchronizationContext
Implements
System.IDisposable
System.Threading.SynchronizationContext.IsWaitNotificationRequired()
System.Threading.SynchronizationContext.OperationCompleted()
System.Threading.SynchronizationContext.OperationStarted()
System.Threading.SynchronizationContext.SetSynchronizationContext(System.Threading.SynchronizationContext)
System.Threading.SynchronizationContext.SetWaitNotificationRequired()
System.Threading.SynchronizationContext.Wait(System.IntPtr[], System.Boolean, System.Int32)
System.Threading.SynchronizationContext.WaitHelper(System.IntPtr[], System.Boolean, System.Int32)
System.Threading.SynchronizationContext.Current
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Threading
Assembly: Sartorius.SAF.dll
Syntax
public sealed class StaSynchronizationContext : SynchronizationContext, IDisposable
Remarks
The DispatcherSynchronizationContext makes problems in .NET Core (some issues with loading the DispatcherFrame from WindowsBase).
Methods
View SourceCreateCopy()
Declaration
public override SynchronizationContext CreateCopy()
Returns
Type | Description |
---|---|
System.Threading.SynchronizationContext |
Overrides
System.Threading.SynchronizationContext.CreateCopy()
View Source
Dispose()
Declaration
public void Dispose()
Post(SendOrPostCallback, Object)
Declaration
public override void Post(SendOrPostCallback d, object state)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.SendOrPostCallback | d | |
System.Object | state |
Overrides
System.Threading.SynchronizationContext.Post(System.Threading.SendOrPostCallback, System.Object)
View Source
Run()
Starts processing the queue. This method will run until the StaSynchronizationContext is disposed.
Declaration
public void Run()
Send(SendOrPostCallback, Object)
Declaration
public override void Send(SendOrPostCallback d, object state)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.SendOrPostCallback | d | |
System.Object | state |
Overrides
System.Threading.SynchronizationContext.Send(System.Threading.SendOrPostCallback, System.Object)
View Source
StartNew()
Creates a new STA thread and starts processing the queue.
Declaration
public static StaSynchronizationContext StartNew()
Returns
Type | Description |
---|---|
StaSynchronizationContext |
Implements
System.IDisposable