Exemple #1
0
 public EventReadResult(EventReadStatus status, string stream, int sequenceNumber, EventInfo eventInfo)
 {
     Status         = status;
     Stream         = stream;
     SequenceNumber = sequenceNumber;
     EventInfo      = eventInfo;
 }
Exemple #2
0
 public EventReadResult(RecordedEvent @event)
 {
     Ensure.NotNull(@event, nameof(@event));
     Status      = EventReadStatus.Success;
     Stream      = @event.EventStreamId;
     EventNumber = @event.EventNumber;
     Event       = @event;
 }
        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);
        }
Exemple #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;
        }
Exemple #6
0
 public EventReadResult(EventReadStatus status, EventInfo eventInfo)
 {
     Status    = status;
     EventInfo = eventInfo;
 }
Exemple #7
0
 public EventReadResult(EventReadStatus status)
 {
     Status = status;
 }
 public EventReadResult(EventReadStatus status, EventInfo eventInfo)
 {
     Status = status;
     EventInfo = eventInfo;
 }