public EventLinkPair(Data.EventRecord eventRecord, Data.EventRecord linkRecord) { Event = new EventRecord(eventRecord); if (linkRecord != null) { Link = new EventRecord(linkRecord); } }
public EventRecord(Data.EventRecord eventRecord) { EventStreamId = eventRecord.EventStreamId; EventNumber = eventRecord.EventNumber; EventId = eventRecord.EventId.ToByteArray(); EventType = eventRecord.EventType; Data = eventRecord.Data; Metadata = eventRecord.Metadata; }
public EventRecord(Data.EventRecord eventRecord) { EventStreamId = eventRecord.EventStreamId; EventNumber = eventRecord.EventNumber; EventId = eventRecord.EventId.ToByteArray(); EventType = eventRecord.EventType; Data = eventRecord.Data; Created = eventRecord.TimeStamp.ToBinary(); Metadata = eventRecord.Metadata; }
public EventRecord(Data.EventRecord eventRecord, long eventNumber) { EventStreamId = eventRecord.EventStreamId; EventNumber = eventNumber; EventId = eventRecord.EventId.ToByteArray(); EventType = eventRecord.EventType; Data = eventRecord.Data; Created = eventRecord.TimeStamp.ToBinary(); Metadata = eventRecord.Metadata; var isJson = eventRecord.IsJson; DataContentType = isJson ? 1 : 0; MetadataContentType = isJson ? 1 : 0; CreatedEpoch = (long)(eventRecord.TimeStamp - new DateTime(1970, 1, 1)).TotalMilliseconds; }
public ResolvedIndexedEvent(Data.EventRecord eventRecord, Data.EventRecord linkRecord) : this(eventRecord != null ? new EventRecord(eventRecord) : null, linkRecord != null ? new EventRecord(linkRecord) : null) { }