The calculator for index of the segment and the offset within segment for the given index.
示例#1
0
 public void Fill(ref Payload payload)
 {
     Head = payload.Head;
     Calculator = payload.Calculator;
     _length = payload.Length;
     _position = payload.Position;
 }
示例#2
0
 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));
 }
示例#3
0
 public Payload(Segment* head, IndexCalculator calculator, int length, int position)
 {
     Head = head;
     Calculator = calculator;
     Length = length;
     Position = position;
 }
示例#4
0
 protected ReadonlySegmentStream(IndexCalculator calculator)
 {
     Calculator = calculator;
 }
示例#5
0
 protected ReadonlySegmentStream(IndexCalculator calculator)
 {
     Calculator = calculator;
 }