Esempio n. 1
0
        public void OnTorrentRemoved(object sender, TorrentActionEventArgs args)
        {
            Torrent torrent = bitTorrentManager.GetTorrent(args.Handle);

            // Marshall the collection call back to the window thread, torrent will be captured
            Action dispatchAction = () => Torrents.Remove(torrent);

            this.currentDispatcher.BeginInvoke(dispatchAction);
        }
Esempio n. 2
0
        public void TorrentActionEventArgsConstructorTest()
        {
            TorrentActionEventArgs args = new TorrentActionEventArgs(5);

            Assert.AreEqual(args.Handle, 5);
        }