示例#1
0
 public EventReadResult(EventReadStatus status, string stream, int sequenceNumber, EventInfo eventInfo)
 {
     Status         = status;
     Stream         = stream;
     SequenceNumber = sequenceNumber;
     EventInfo      = eventInfo;
 }
示例#2
0
 public EventReadResult(RecordedEvent @event)
 {
     Ensure.NotNull(@event, nameof(@event));
     Status      = EventReadStatus.Success;
     Stream      = @event.EventStreamId;
     EventNumber = @event.EventNumber;
     Event       = @event;
 }
示例#3
0
        private static EventReadResult CreateEventReadResult(EventReadStatus status)
        {
            var result = (EventReadResult)FormatterServices.GetUninitializedObject(typeof(EventReadResult));

            typeof(EventReadResult)
            .GetField(nameof(EventReadResult.Status), BindingFlags.Instance | BindingFlags.Public)
            ?.SetValue(result, status);
            return(result);
        }
示例#4
0
        internal EventReadResult(EventReadStatus status,
                                 string stream,
                                 long eventNumber,
                                 ClientMessage.ResolvedIndexedEvent @event)
        {
            Ensure.NotNullOrEmpty(stream, "stream");

            Status      = status;
            Stream      = stream;
            EventNumber = eventNumber;
            Event       = status == EventReadStatus.Success ? new ResolvedEvent(@event) : (ResolvedEvent?)null;
        }
        internal EventReadResult(EventReadStatus status, 
                                 string stream, 
                                 int eventNumber, 
                                 ClientMessage.ResolvedIndexedEvent @event)
        {
            Ensure.NotNullOrEmpty(stream, "stream");

            Status = status;
            Stream = stream;
            EventNumber = eventNumber;
            Event = status == EventReadStatus.Success ? new ResolvedEvent(@event) : (ResolvedEvent?)null;
        }
示例#6
0
 public EventReadResult(EventReadStatus status, EventInfo eventInfo)
 {
     Status    = status;
     EventInfo = eventInfo;
 }
示例#7
0
 public EventReadResult(EventReadStatus status)
 {
     Status = status;
 }
 public EventReadResult(EventReadStatus status, EventInfo eventInfo)
 {
     Status = status;
     EventInfo = eventInfo;
 }