コード例 #1
0
 public static Scope Begin()
 {
     var sync = new UnitTestSynchronizationContext();
     var old = SynchronizationContext.Current;
     SynchronizationContext.SetSynchronizationContext(sync);
     return new Scope(old, sync);
 }
コード例 #2
0
        public static Scope Begin()
        {
            var sync = new UnitTestSynchronizationContext();
            var old  = SynchronizationContext.Current;

            SynchronizationContext.SetSynchronizationContext(sync);
            return(new Scope(old, sync));
        }
コード例 #3
0
 public Scope(SynchronizationContext old, UnitTestSynchronizationContext n)
 {
     _old = old;
     _new = n;
 }
コード例 #4
0
 public Scope(SynchronizationContext old, UnitTestSynchronizationContext n)
 {
     _old = old;
     _new = n;
 }