public void Fill(ref Payload payload) { Head = payload.Head; Calculator = payload.Calculator; _length = payload.Length; _position = payload.Position; }
public void Test(int segmentLength, long index, int expectedSegmentIndex, int expectedIndexInSegment) { var calculator = new IndexCalculator(segmentLength); Assert.AreEqual(expectedIndexInSegment, calculator.GetIndexInSegment(index)); Assert.AreEqual(expectedSegmentIndex, calculator.GetSegmentIndex(index)); }
public Payload(Segment* head, IndexCalculator calculator, int length, int position) { Head = head; Calculator = calculator; Length = length; Position = position; }
protected ReadonlySegmentStream(IndexCalculator calculator) { Calculator = calculator; }