Example #1
0
 public static Guid EventId(this EnvelopeHeaders headers)
 {
     return(headers.GetGuid(CommonHeaders.EventId));
 }
Example #2
0
 public static Instant Timestamp(this EnvelopeHeaders headers)
 {
     return(headers.GetInstant(CommonHeaders.Timestamp));
 }
Example #3
0
 public static long EventStreamNumber(this EnvelopeHeaders headers)
 {
     return(headers.GetLong(CommonHeaders.EventStreamNumber));
 }
Example #4
0
 public static Guid AggregateId(this EnvelopeHeaders headers)
 {
     return(headers.GetGuid(CommonHeaders.AggregateId));
 }
Example #5
0
 public static DomainId AggregateId(this EnvelopeHeaders headers)
 {
     return(DomainId.Create(headers.GetString(CommonHeaders.AggregateId)));
 }
Example #6
0
 public static string EventPosition(this EnvelopeHeaders headers)
 {
     return(headers.GetString(CommonHeaders.EventNumber));
 }
Example #7
0
 public static Instant Timestamp(this EnvelopeHeaders headers)
 {
     return(headers[CommonHeaders.Timestamp].ToInstant(CultureInfo.InvariantCulture));
 }
Example #8
0
        public void Should_create_headers()
        {
            var headers = new EnvelopeHeaders();

            Assert.Empty(headers);
        }
Example #9
0
 public static Guid EventId(this EnvelopeHeaders headers)
 {
     return(headers[CommonHeaders.EventId].ToGuid(CultureInfo.InvariantCulture));
 }
Example #10
0
 public static long EventStreamNumber(this EnvelopeHeaders headers)
 {
     return(headers[CommonHeaders.EventStreamNumber].ToInt64(CultureInfo.InvariantCulture));
 }
Example #11
0
        public void Should_create_headers_with_null_properties()
        {
            var headers = new EnvelopeHeaders(null);

            Assert.Equal(0, headers.Count);
        }
Example #12
0
        public void Should_create_headers()
        {
            var headers = new EnvelopeHeaders();

            Assert.Equal(0, headers.Count);
        }
 public static bool Restored(this EnvelopeHeaders headers)
 {
     return(headers.GetBoolean(CommonHeaders.Restored));
 }