コード例 #1
0
 public EndGameSwitcher(StandardPicker standard, EndGamePicker endgame, int blocksPerPiece,
                        TorrentManager torrentManager)
     : base(null)
 {
     _standard       = standard;
     _endgame        = endgame;
     _blocksPerPiece = blocksPerPiece;
     _torrentManager = torrentManager;
 }
コード例 #2
0
 public RarestFirstPicker(PiecePicker picker)
     : base(picker)
 {
     _rarest = new Stack<BitField>();
     _spares = new Stack<BitField>();
 }
コード例 #3
0
 public RandomisedPicker(PiecePicker picker)
     : base(picker)
 {
 }
コード例 #4
0
 public IgnoringPicker(BitField bitfield, PiecePicker picker)
     : base(picker)
 {
     _bitfield = bitfield;
     _temp = new BitField(bitfield.Length);
 }
コード例 #5
0
 protected PiecePicker(PiecePicker picker)
 {
     _picker = picker;
 }
コード例 #6
0
 public IgnoringPicker(BitField bitfield, PiecePicker picker)
     : base(picker)
 {
     _bitfield = bitfield;
     _temp     = new BitField(bitfield.Length);
 }
コード例 #7
0
 public LoggingPicker(PiecePicker picker)
     : base(picker)
 {
 }
コード例 #8
0
 protected PiecePicker(PiecePicker picker)
 {
     _picker = picker;
 }
コード例 #9
0
 /// <summary>
 /// Creates a new piece picker with support for prioritization of files. The sliding window will be positioned to the
 /// start
 /// of the first file to be downloaded
 /// </summary>
 /// <param name="picker">The picker.</param>
 /// <param name="highPrioritySetSize">Size of high priority set</param>
 internal SlidingWindowPicker(PiecePicker picker, int highPrioritySetSize)
     : this(picker, highPrioritySetSize, 4)
 {
 }
コード例 #10
0
 /// <summary>
 ///     Empty constructor for changing piece pickers
 /// </summary>
 public SlidingWindowPicker(PiecePicker picker)
     : base(picker)
 {
 }
コード例 #11
0
 public RarestFirstPicker(PiecePicker picker)
     : base(picker)
 {
     _rarest = new Stack <BitField>();
     _spares = new Stack <BitField>();
 }
コード例 #12
0
 /// <summary>
 /// Create a new SlidingWindowPicker with the given set sizes. The sliding window will be positioned to the start
 /// of the first file to be downloaded
 /// </summary>
 /// <param name="picker">The picker.</param>
 /// <param name="highPrioritySetSize">Size of high priority set</param>
 /// <param name="mediumToHighRatio">Size of medium priority set as a multiple of the high priority set size</param>
 internal SlidingWindowPicker(PiecePicker picker, int highPrioritySetSize, int mediumToHighRatio)
     : base(picker)
 {
     HighPrioritySetSize = highPrioritySetSize;
     MediumToHighRatio = mediumToHighRatio;
 }
コード例 #13
0
 /// <summary>
 /// Creates a new piece picker with support for prioritization of files. The sliding window will be positioned to the
 /// start
 /// of the first file to be downloaded
 /// </summary>
 /// <param name="picker">The picker.</param>
 /// <param name="highPrioritySetSize">Size of high priority set</param>
 internal SlidingWindowPicker(PiecePicker picker, int highPrioritySetSize)
     : this(picker, highPrioritySetSize, 4)
 {
 }
コード例 #14
0
 /// <summary>
 ///     Empty constructor for changing piece pickers
 /// </summary>
 public SlidingWindowPicker(PiecePicker picker)
     : base(picker)
 {
 }
コード例 #15
0
 /// <summary>
 /// Create a new SlidingWindowPicker with the given set sizes. The sliding window will be positioned to the start
 /// of the first file to be downloaded
 /// </summary>
 /// <param name="picker">The picker.</param>
 /// <param name="highPrioritySetSize">Size of high priority set</param>
 /// <param name="mediumToHighRatio">Size of medium priority set as a multiple of the high priority set size</param>
 internal SlidingWindowPicker(PiecePicker picker, int highPrioritySetSize, int mediumToHighRatio)
     : base(picker)
 {
     HighPrioritySetSize = highPrioritySetSize;
     MediumToHighRatio   = mediumToHighRatio;
 }
コード例 #16
0
 public RandomisedPicker(PiecePicker picker)
     : base(picker)
 {
 }
コード例 #17
0
 public PriorityPicker(PiecePicker picker)
     : base(picker)
 {
 }