Beispiel #1
0
        private void EnterHashingMode()
        {
            ChangeState(TorrentState.Hashing);
            var hashingMode = new HashingMode(new BlockManager(Data, DownloadFolder),
                                              new BlockStrategist(Data), Data, _monitor);

            hashingMode.RaisedException += (s, e) => OnRaisedException(e.Value);
            hashingMode.HashingComplete += (sender, args) => HashingComplete();
            Mode = hashingMode;
            _statsReportTimer.Change(0, 250);
            Mode.Start();
        }
Beispiel #2
0
 public DownloadMode(HashingMode hashMode) : this(new BlockManager(hashMode.Metadata, hashMode.BlockManager.MainDirectory),
                                                  hashMode.BlockStrategist, hashMode.Metadata, hashMode.Monitor)
 {
 }
 private void EnterHashingMode()
 {
     ChangeState(TorrentState.Hashing);
     var hashingMode = new HashingMode(new BlockManager(Data, DownloadFolder),
                                       new BlockStrategist(Data), Data, monitor);
     hashingMode.RaisedException += (s, e) => OnRaisedException(e.Value);
     hashingMode.HashingComplete += (sender, args) => HashingComplete();
     Mode = hashingMode;
     statsReportTimer.Change(0, 250);
     Mode.Start();
 }
Beispiel #4
0
 public DownloadMode(HashingMode hashMode)
     : this(new BlockManager(hashMode.Metadata, hashMode.BlockManager.MainDirectory),
     hashMode.BlockStrategist, hashMode.Metadata, hashMode.Monitor)
 {
 }