public void ReregisterManager() { ManualResetEvent handle = new ManualResetEvent(false); rig.Manager.TorrentStateChanged += delegate(object sender, TorrentStateChangedEventArgs e) { if (e.OldState == TorrentState.Hashing) { handle.Set(); } }; rig.Manager.HashCheck(false); handle.WaitOne(); handle.Reset(); rig.Engine.Unregister(rig.Manager); TestRig rig2 = TestRig.CreateMultiFile(new TestWriter()); rig2.Engine.Unregister(rig2.Manager); rig.Engine.Register(rig2.Manager); rig2.Manager.TorrentStateChanged += delegate(object sender, TorrentStateChangedEventArgs e) { if (e.OldState == TorrentState.Hashing) { handle.Set(); } }; rig2.Manager.HashCheck(true); handle.WaitOne(); rig2.Dispose(); }
public void GlobalTeardown() { rig.Dispose(); }
public void FixtureTeardown() { rig.Dispose(); }
public void Teardown() { rig.Dispose(); conn.Dispose(); }
public void Teardown() { rig.Manager.Stop(); pair.Dispose(); rig.Dispose(); }
public void Dispose() { rig.Manager.Stop(); pair.Dispose(); rig.Dispose(); }
public void Dispose() { listener.Close(); rig.Dispose(); }
public void Dispose() { TestRig.Dispose(); }
public void Dispose() { rig.Dispose(); conn.Dispose(); }
public void TearDown() { listener.Close(); rig.Dispose(); }
public void FixtureTeardown() { testRig.Dispose(); }