public IndexReadStreamResult(int fromEventNumber, int maxCount, ReadStreamResult result) { if (result == ReadStreamResult.Success) throw new ArgumentException(string.Format("Wrong ReadStreamResult provided for failure constructor: {0}.", result), "result"); FromEventNumber = fromEventNumber; MaxCount = maxCount; Result = result; NextEventNumber = -1; LastEventNumber = -1; IsEndOfStream = true; Records = ReadIndex.EmptyRecords; }
public IndexReadStreamResult(int fromEventNumber, int maxCount, ReadStreamResult result, StreamMetadata metadata, int lastEventNumber) { if (result == ReadStreamResult.Success) { throw new ArgumentException(String.Format("Wrong ReadStreamResult provided for failure constructor: {0}.", result), "result"); } FromEventNumber = fromEventNumber; MaxCount = maxCount; Result = result; NextEventNumber = -1; LastEventNumber = lastEventNumber; IsEndOfStream = true; Records = EmptyRecords; Metadata = metadata; }
public IndexReadStreamResult(int fromEventNumber, int maxCount, EventRecord[] records, int nextEventNumber, int lastEventNumber, bool isEndOfStream) { Ensure.NotNull(records, "records"); FromEventNumber = fromEventNumber; MaxCount = maxCount; Result = ReadStreamResult.Success; Records = records; NextEventNumber = nextEventNumber; LastEventNumber = lastEventNumber; IsEndOfStream = isEndOfStream; }
public IndexReadStreamResult(int fromEventNumber, int maxCount, EventRecord[] records, StreamMetadata metadata, int nextEventNumber, int lastEventNumber, bool isEndOfStream) { Ensure.NotNull(records, "records"); FromEventNumber = fromEventNumber; MaxCount = maxCount; Result = ReadStreamResult.Success; Records = records; Metadata = metadata; NextEventNumber = nextEventNumber; LastEventNumber = lastEventNumber; IsEndOfStream = isEndOfStream; }