C# Class Tests.MockSynchronizationContext

Prism's UI thread option works by invoking Post on the current synchronization context. When we do that, base.Post actually looses SynchronizationContext.Current because the work has been delegated to ThreadPool.QueueUserWorkItem. This implementation makes our async-intended call behave synchronously, so we can preserve and verify sync contexts for callbacks during our unit tests.
Inheritance: System.Threading.SynchronizationContext
Mostrar archivo Open project: LongoMatch/longomatch

Public Methods

Method Description
Post ( SendOrPostCallback d, object state ) : void
Send ( SendOrPostCallback d, object state ) : void

Method Details

Post() public method

public Post ( SendOrPostCallback d, object state ) : void
d SendOrPostCallback
state object
return void

Send() public method

public Send ( SendOrPostCallback d, object state ) : void
d SendOrPostCallback
state object
return void