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();
        }
예제 #2
0
 public void GlobalTeardown()
 {
     rig.Dispose();
 }
예제 #3
0
 public void FixtureTeardown()
 {
     rig.Dispose();
 }
 public void Teardown()
 {
     rig.Dispose();
     conn.Dispose();
 }
예제 #5
0
 public void Teardown()
 {
     rig.Manager.Stop();
     pair.Dispose();
     rig.Dispose();
 }
예제 #6
0
 public void Dispose()
 {
     rig.Manager.Stop();
     pair.Dispose();
     rig.Dispose();
 }
예제 #7
0
 public void Dispose()
 {
     listener.Close();
     rig.Dispose();
 }
 public void Dispose()
 {
     TestRig.Dispose();
 }
 public void Dispose()
 {
     rig.Dispose();
     conn.Dispose();
 }
예제 #10
0
 public void TearDown()
 {
     listener.Close();
     rig.Dispose();
 }
 public void FixtureTeardown()
 {
     testRig.Dispose();
 }