public void DispatcherOnSameThread() { var d1 = new MyDispatcherObject(); var d2 = new MyDispatcherObject(); Assert.IsNotNull(d1); Assert.IsNotNull(d2); Assert.AreSame(d1.Dispatcher, d2.Dispatcher); }
private static DispatcherObject CreateDispatcherObjectOnThread() { DispatcherObject dispatcherObject = null; var thread = new Thread(() => dispatcherObject = new MyDispatcherObject()); thread.Start(); thread.Join(); return(dispatcherObject); }
public void VerifyAccessOnSameThread() { DispatcherObject d = new MyDispatcherObject(); d.VerifyAccess(); }
public void CheckAccessOnSameThread() { DispatcherObject d = new MyDispatcherObject(); Assert.IsTrue(d.CheckAccess()); }