コード例 #1
0
 public STAContext()
 {
     _queue = new BlockingCollection <Task>();
     _synchronizationContext = new STASynchronizationContext(this);
     _taskScheduler          = new STATaskScheduler(this);
     TaskFactory             = new TaskFactory(CancellationToken.None, TaskCreationOptions.HideScheduler, TaskContinuationOptions.HideScheduler, _taskScheduler);
 }
 private bool Equals(STASynchronizationContext other)
 {
     return(Equals(Context, other.Context));
 }