internal PiecePicker CreateStandardPicker()
        {
            PiecePicker picker;

            if (ClientEngine.SupportsEndgameMode)
            {
                picker = new EndGameSwitcher(new StandardPicker(), new EndGamePicker(), torrent.PieceLength / Piece.BlockSize, this);
            }
            else
            {
                picker = new StandardPicker();
            }
            picker = new RandomisedPicker(picker);
            picker = new RarestFirstPicker(picker);
            picker = new PriorityPicker(picker);
            return(picker);
        }
Example #2
0
 public void Setup()
 {
     tester = new TestPicker();
     picker = new RandomisedPicker(tester);
 }
Example #3
0
 public RandomisedPickerTests()
 {
     tester = new TestPicker();
     picker = new RandomisedPicker(tester);
 }