コード例 #1
0
        public void ByteOrderMatters()
        {
            const int count = 258;

            for (int i = 0; i < count; i++)
            {
                _changeStream.Append(BitConverter.GetBytes(i));
            }
            var cp = _changeStream.GetLastCheckpoint();

            BitConverter.ToInt32(cp.Value, 0).ShouldBe(count - 1);
            cp.Key.ShouldBe(count - 1);
        }
コード例 #2
0
 public Task <AllStreamPosition> ReadHead(CancellationToken cancellationToken = default(CancellationToken)) =>
 Task.FromResult(TranslateKey(_allStream.GetLastCheckpoint().Key));