public SqlSnapshot(EventStreamRevisionIdentity identity, EventProviderVersion version, byte[] typeId, byte[] data) { Identity = identity; Version = version; TypeId = typeId; Data = data; }
public SnapshotRevision(EventStreamRevisionIdentity identity, EventProviderVersion version, Snapshot snapshot) : base(identity, version) { Contract.Requires(identity != null); Contract.Requires(version != null); Contract.Requires(snapshot != null); _snapshot = snapshot; }
private void AddEventRow(DataTable dataTable, EventStreamRevisionIdentity revisionIdentity, int sequence, int version, IDomainEvent domainEvent) { // add row to the data table var dataRow = dataTable.NewRow(); var eventType = new TransactionEventType(domainEvent.GetType()); // populate data row dataRow["EventId"] = domainEvent.DomainEventId; dataRow["EventProviderRevisionId"] = revisionIdentity.Value; dataRow["EventProviderVersion"] = version; dataRow["Sequence"] = sequence; dataRow["TypeId"] = _typeFactory.GetHash(domainEvent.GetType()); dataRow["TypeFullName"] = eventType.FullName; dataRow["Data"] = _serializer.SerializeObject(domainEvent); // add new row to table dataTable.Rows.Add(dataRow); }