public static Scope Begin() { var sync = new UnitTestSynchronizationContext(); var old = SynchronizationContext.Current; SynchronizationContext.SetSynchronizationContext(sync); return new Scope(old, sync); }
public static Scope Begin() { var sync = new UnitTestSynchronizationContext(); var old = SynchronizationContext.Current; SynchronizationContext.SetSynchronizationContext(sync); return(new Scope(old, sync)); }
public Scope(SynchronizationContext old, UnitTestSynchronizationContext n) { _old = old; _new = n; }