public SnapshotStore( ISnapshotSerializer snapshotSerializer, IFrameworkContextFactory frameworkContextFactor) { _snapshotSerializer = snapshotSerializer; _frameworkContextFactor = frameworkContextFactor; }
// Todo: Use snapshot store for base calls (when snapshot isn't in cache) public CachableSnapshotStore( ISnapshotSerializer snapshotSerializer, IFrameworkContextFactory frameworkContextFactor, ISnapshotStore snapshotStore) { _snapshotStore = snapshotStore; }
public SnapshotsSettings( ITriggerThresholdResolver triggerResolver, ISnapshotSerializer serializer) { TriggerResolver = triggerResolver ?? throw new ArgumentNullException(nameof(triggerResolver)); Serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); }
public KnownSerializers(IEventSerializer eventSerializer, IEventDeserializer eventDeserializer, ISnapshotSerializer snapshotSerializer, ISnapshotDeserializer snapshotDeserializer) { Events = new SerializationPair <IEventSerializer, IEventDeserializer>(eventSerializer, eventDeserializer); Snapshots = new SerializationPair <ISnapshotSerializer, ISnapshotDeserializer>(snapshotSerializer, snapshotDeserializer); }
public StartupManager( ILog log, ICandlesCacheInitalizationService cacheInitalizationService, ICandlesSubscriber candlesSubscriber, ISnapshotSerializer snapshotSerializer, ICandlesPersistenceQueueSnapshotRepository persistenceQueueSnapshotRepository, ICandlesPersistenceQueue persistenceQueue, ICandlesPersistenceManager persistenceManager, bool migrationEnabled, ICqrsEngine cqrsEngine) { if (log == null) { throw new ArgumentNullException(nameof(log)); } _log = log.CreateComponentScope(nameof(StartupManager)) ?? throw new InvalidOperationException("Couldn't create a component scope for logging."); _cacheInitalizationService = cacheInitalizationService ?? throw new ArgumentNullException(nameof(cacheInitalizationService)); _candlesSubscriber = candlesSubscriber ?? throw new ArgumentNullException(nameof(candlesSubscriber)); _snapshotSerializer = snapshotSerializer ?? throw new ArgumentNullException(nameof(snapshotSerializer)); _persistenceQueueSnapshotRepository = persistenceQueueSnapshotRepository ?? throw new ArgumentNullException(nameof(persistenceQueueSnapshotRepository)); _persistenceQueue = persistenceQueue ?? throw new ArgumentNullException(nameof(persistenceQueue)); _persistenceManager = persistenceManager ?? throw new ArgumentNullException(nameof(persistenceManager)); _migrationEnabled = migrationEnabled; _cqrsEngine = cqrsEngine ?? throw new ArgumentNullException(nameof(cqrsEngine)); }
public ShutdownManager( ILogFactory logFactory, ICandlesSubscriber candlesSubscriber, ISnapshotSerializer snapshotSerializer, ICandlesPersistenceQueueSnapshotRepository persistenceQueueSnapshotRepository, ICandlesPersistenceQueue persistenceQueue, ICandlesPersistenceManager persistenceManager, CandlesMigrationManager migrationManager, bool migrationEnabled) { if (logFactory == null) { throw new ArgumentNullException(nameof(logFactory)); } _log = logFactory.CreateLog(this); _candlesSubcriber = candlesSubscriber ?? throw new ArgumentNullException(nameof(candlesSubscriber)); _snapshotSerializer = snapshotSerializer ?? throw new ArgumentNullException(nameof(snapshotSerializer)); _persistenceQueueSnapshotRepository = persistenceQueueSnapshotRepository ?? throw new ArgumentNullException(nameof(persistenceQueueSnapshotRepository)); _persistenceQueue = persistenceQueue ?? throw new ArgumentNullException(nameof(persistenceQueue)); _persistenceManager = persistenceManager ?? throw new ArgumentNullException(nameof(persistenceManager)); _migrationManager = migrationManager ?? throw new ArgumentNullException(nameof(migrationManager)); _migrationEnabled = migrationEnabled; }
/// <summary> /// Creates the snapshot data object from the aggregate root. /// </summary> /// <param name="aggregateRoot">The aggregate root for which the snapshot is being created.</param> /// <returns>The snapshot data object.</returns> public static SnapshotDataObject CreateFromAggregateRoot(ISourcedAggregateRoot aggregateRoot) { ISnapshotSerializer serializer = null; string eventSerializerTypeName = ConfigurationManager.AppSettings["napshotSerializer"]; if (eventSerializerTypeName == null) { serializer = new SnapshotXmlSerializer(); } else { Type serializerType = Type.GetType(eventSerializerTypeName); if (serializerType == null) { throw new InfrastructureException("The serializer defined by type '{0}' doesn't exist.", eventSerializerTypeName); } serializer = (ISnapshotSerializer)Activator.CreateInstance(serializerType); } ISnapshot snapshot = aggregateRoot.CreateSnapshot(); return(new SnapshotDataObject { AggregateRootId = aggregateRoot.Id, AggregateRootType = aggregateRoot.GetType().AssemblyQualifiedName, Version = aggregateRoot.Version, SnapshotType = snapshot.GetType().AssemblyQualifiedName, Timestamp = snapshot.Timestamp, SnapshotData = serializer.Serialize(snapshot) }); }
public StartupManager( ILogFactory logFactory, ICandlesCacheInitalizationService cacheInitalizationService, RedisCacheCaretaker cacheCaretaker, ICandlesSubscriber candlesSubscriber, ISnapshotSerializer snapshotSerializer, ICandlesPersistenceQueueSnapshotRepository persistenceQueueSnapshotRepository, ICandlesPersistenceQueue persistenceQueue, ICandlesPersistenceManager persistenceManager, bool migrationEnabled) { if (logFactory == null) { throw new ArgumentNullException(nameof(logFactory)); } _log = logFactory.CreateLog(this); _cacheInitalizationService = cacheInitalizationService ?? throw new ArgumentNullException(nameof(cacheInitalizationService)); _cacheCaretaker = cacheCaretaker ?? throw new ArgumentNullException(nameof(cacheCaretaker)); _candlesSubscriber = candlesSubscriber ?? throw new ArgumentNullException(nameof(candlesSubscriber)); _snapshotSerializer = snapshotSerializer ?? throw new ArgumentNullException(nameof(snapshotSerializer)); _persistenceQueueSnapshotRepository = persistenceQueueSnapshotRepository ?? throw new ArgumentNullException(nameof(persistenceQueueSnapshotRepository)); _persistenceQueue = persistenceQueue ?? throw new ArgumentNullException(nameof(persistenceQueue)); _persistenceManager = persistenceManager ?? throw new ArgumentNullException(nameof(persistenceManager)); _migrationEnabled = migrationEnabled; }
public SnapshotSendChannel(SnapshotSerializer snapshotSerializer) { _sentSnapshot = new Dictionary <int, ISnapshot>(); _snapshotQueue = new Queue <int>(); _snapSerializer = snapshotSerializer; AckedSnapshotId = -1; }
public SnapshotTask(IDialogCreator dialogCreator, ISnapshotSerializer snapshotSerializer, ISnapshotMapper snapshotMapper, IExecutionContext executionContext, IObjectTypeResolver objectTypeResolver) { _dialogCreator = dialogCreator; _executionContext = executionContext; _objectTypeResolver = objectTypeResolver; _snapshotSerializer = snapshotSerializer; _snapshotMapper = snapshotMapper; }
public EventStoreSettings Build( DbConnections connections, IPublisherFactory publisherFactory, IEventSerializer eventSerializer, ISnapshotSerializer snapshotSerializer) { return(_builder.Build(connections, publisherFactory, eventSerializer, snapshotSerializer)); }
public SnapshotStore( DbConnections connections, IEventStoreContext context, ISnapshotSerializer serializer) { _connections = connections; _context = context; _serializer = serializer; }
// version has 2 bytes //private const int _versionLen = 2; // buffer length 4 bytes //private const int _bufSizeLen = 4; public SnapshotStorageDate(string fileName, ISnapshotSerializer <TKey, TMessage> serializer) { if (fileName.IsEmpty()) { throw new ArgumentNullException(nameof(fileName)); } _fileName = fileName; _serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); if (File.Exists(_fileName)) { Debug.WriteLine($"Snapshot (Load): {_fileName}"); using (var stream = File.OpenRead(_fileName)) { _version = new Version(stream.ReadByte(), stream.ReadByte()); while (stream.Position < stream.Length) { var size = stream.Read <int>(); var buffer = new byte[size]; stream.ReadBytes(buffer, buffer.Length); //var offset = stream.Position; TMessage message; try { message = _serializer.Deserialize(_version, buffer); } catch (Exception ex) { ex.LogError(); continue; } var key = _serializer.GetKey(message); _snapshots.Add(key, message); _buffers.Add(key, buffer); } //_currOffset = stream.Length; } } else { _version = _serializer.Version; //_currOffset = _versionLen; } }
/// <summary> /// Initializes a new instance of the <see cref="SnapshotAssert"/> class. /// </summary> /// <param name="snapshotSerializer">The serializer of the snapshot object.</param> /// <param name="snapshotFileHandler">The snapshot file handler.</param> /// <param name="snapshotEnvironmentCleaner">The environment cleanup utility.</param> /// <param name="snapshotComparer">The snaspshot text comparer.</param> public SnapshotAssert(ISnapshotSerializer snapshotSerializer, ISnapshotFileHandler snapshotFileHandler, ISnapshotEnvironmentCleaner snapshotEnvironmentCleaner, ISnapshotComparer snapshotComparer) { _snapshotSerializer = snapshotSerializer ?? throw new ArgumentNullException(nameof(snapshotSerializer)); _snapshotFileHandler = snapshotFileHandler ?? throw new ArgumentNullException(nameof(snapshotFileHandler)); _snapshotEnvironmentCleaner = snapshotEnvironmentCleaner ?? throw new ArgumentNullException(nameof(snapshotEnvironmentCleaner)); _snapshotComparer = snapshotComparer ?? throw new ArgumentNullException(nameof(snapshotComparer)); }
/// <summary> /// Initializes a new instance of the <see cref="SnapshotStorage{TMessage}"/>. /// </summary> /// <param name="path">Path to storage.</param> /// <param name="serializer">Serializer.</param> public SnapshotStorage(string path, ISnapshotSerializer <TMessage> serializer) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (serializer == null) { throw new ArgumentNullException(nameof(serializer)); } _path = path.ToFullPath(); _serializer = serializer; }
public Session( ILoggerFactory loggerFactory, IEventStore eventStore, IEventPublisher eventPublisher, IEventSerializer eventSerializer, ISnapshotSerializer snapshotSerializer, IEnumerable <IMetadataProvider> metadataProviders = null, ISnapshotStrategy snapshotStrategy = null) { if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } if (eventStore == null) { throw new ArgumentNullException(nameof(eventStore)); } if (eventPublisher == null) { throw new ArgumentNullException(nameof(eventPublisher)); } if (metadataProviders == null) { metadataProviders = Enumerable.Empty <IMetadataProvider>(); } metadataProviders = metadataProviders.Concat(new IMetadataProvider[] { new AggregateTypeMetadataProvider(), new EventTypeMetadataProvider(), new CorrelationIdMetadataProvider() }); if (snapshotStrategy == null) { snapshotStrategy = new IntervalSnapshotStrategy(); } _logger = loggerFactory.Create(nameof(Session)); _snapshotStrategy = snapshotStrategy; _eventStore = eventStore; _eventSerializer = eventSerializer; _snapshotSerializer = snapshotSerializer; _metadataProviders = metadataProviders; _eventPublisher = eventPublisher; }
protected override Task Context() { _dialogCreator = A.Fake <IDialogCreator>(); _executionContext = A.Fake <IExecutionContext>(); _snapshotSerializer = A.Fake <ISnapshotSerializer>(); _snapshotMapper = A.Fake <ISnapshotMapper>(); _objectTypeResolver = A.Fake <IObjectTypeResolver>(); sut = new SnapshotTask(_dialogCreator, _snapshotSerializer, _snapshotMapper, _executionContext, _objectTypeResolver); _parameter = A.Fake <IParameter>(); _parameter.Name = "Param"; A.CallTo(() => _objectTypeResolver.TypeFor((IWithName)_parameter)).Returns(_parameterType); _parameterSnapshot = new Parameter(); A.CallTo(() => _snapshotMapper.MapToSnapshot(_parameter)).Returns(_parameterSnapshot); return(Task.FromResult(true)); }
public ShutdownManager( ILog log, ICandlesSubscriber candlesSubscriber, ISnapshotSerializer snapshotSerializer, ICandlesPersistenceQueueSnapshotRepository persistenceQueueSnapshotRepository, ICandlesPersistenceQueue persistenceQueue, ICandlesPersistenceManager persistenceManager, CandlesMigrationManager migrationManager) { _log = log.CreateComponentScope(nameof(ShutdownManager)); _candlesSubcriber = candlesSubscriber; _snapshotSerializer = snapshotSerializer; _persistenceQueueSnapshotRepository = persistenceQueueSnapshotRepository; _persistenceQueue = persistenceQueue; _persistenceManager = persistenceManager; _migrationManager = migrationManager; }
public StartupManager( ILog log, ICandlesCacheInitalizationService cacheInitalizationService, ICandlesSubscriber candlesSubscriber, ISnapshotSerializer snapshotSerializer, ICandlesPersistenceQueueSnapshotRepository persistenceQueueSnapshotRepository, ICandlesPersistenceQueue persistenceQueue, ICandlesPersistenceManager persistenceManager) { _log = log.CreateComponentScope(nameof(StartupManager)); _cacheInitalizationService = cacheInitalizationService; _candlesSubscriber = candlesSubscriber; _snapshotSerializer = snapshotSerializer; _persistenceQueueSnapshotRepository = persistenceQueueSnapshotRepository; _persistenceQueue = persistenceQueue; _persistenceManager = persistenceManager; }
public SnapshotDataObject() { string eventSerializerTypeName = ConfigurationManager.AppSettings["napshotSerializer"]; if (eventSerializerTypeName == null) { serializer = new SnapshotXmlSerializer(); } else { Type serializerType = Type.GetType(eventSerializerTypeName); if (serializerType == null) { throw new InfrastructureException("The serializer defined by type '{0}' doesn't exist.", eventSerializerTypeName); } serializer = (ISnapshotSerializer)Activator.CreateInstance(serializerType); } }
public static async Task TakeSnapshot(this Aggregate aggregate, IEventStore eventStore, ISnapshotSerializer snapshotSerializer) { var snapshot = ((ISnapshotAggregate)aggregate).CreateSnapshot(); var metadatas = new[] { new KeyValuePair <string, object>(MetadataKeys.AggregateId, aggregate.Id), new KeyValuePair <string, object>(MetadataKeys.AggregateSequenceNumber, aggregate.Sequence), new KeyValuePair <string, object>(MetadataKeys.SnapshotId, Guid.NewGuid()), new KeyValuePair <string, object>(MetadataKeys.SnapshotClrType, snapshot.GetType().AssemblyQualifiedName), new KeyValuePair <string, object>(MetadataKeys.SnapshotName, snapshot.GetType().Name), }; var serializedSnapshot = snapshotSerializer.Serialize(aggregate, snapshot, metadatas); await eventStore.SaveSnapshotAsync(serializedSnapshot).ConfigureAwait(false); }
/// <summary> /// Initializes a new instance of <c>SnapshotDataObject</c> class. /// </summary> public SnapshotDataObject() { ApworksConfigSection config = AppRuntime.Instance.CurrentApplication.ConfigSource.Config; if (config.Serializers == null || config.Serializers.SnapshotSerializer == null || string.IsNullOrEmpty(config.Serializers.SnapshotSerializer.Provider) || string.IsNullOrWhiteSpace(config.Serializers.SnapshotSerializer.Provider)) { serializer = new SnapshotXmlSerializer(); } else { string typeName = config.Serializers.SnapshotSerializer.Provider; Type serializerType = Type.GetType(typeName); if (serializerType == null) throw new InfrastructureException("The serializer defined by type '{0}' doesn't exist.", typeName); serializer = (ISnapshotSerializer)Activator.CreateInstance(serializerType); } }
public EventStoreSettings Build( DbConnections connections, IPublisherFactory publisherFactory, IEventSerializer eventSerializer, ISnapshotSerializer snapshotSerializer) { if (snapshotSerializer == null) { throw new ArgumentNullException(nameof(snapshotSerializer)); } var tempSettings = Build(connections, publisherFactory, eventSerializer); var snapshotsSettings = new SnapshotsSettings(_thresholdResolver, snapshotSerializer); return(new EventStoreSettings( tempSettings.Store, tempSettings.AggregateFactories, snapshotsSettings)); }
/// <summary> /// Initializes a new instance of <c>SnapshotDataObject</c> class. /// </summary> public SnapshotDataObject() { ApworksConfigSection config = AppRuntime.Instance.CurrentApplication.ConfigSource.Config; if (config.Serializers == null || config.Serializers.SnapshotSerializer == null || string.IsNullOrEmpty(config.Serializers.SnapshotSerializer.Provider) || string.IsNullOrWhiteSpace(config.Serializers.SnapshotSerializer.Provider)) { serializer = new SnapshotXmlSerializer(); } else { string typeName = config.Serializers.SnapshotSerializer.Provider; Type serializerType = Type.GetType(typeName); if (serializerType == null) { throw new InfrastructureException("The serializer defined by type '{0}' doesn't exist.", typeName); } serializer = (ISnapshotSerializer)Activator.CreateInstance(serializerType); } }
/// <summary> /// Creates the snapshot data object from the aggregate root. /// </summary> /// <param name="aggregateRoot">The aggregate root for which the snapshot is being created.</param> /// <returns>The snapshot data object.</returns> public static SnapshotDataObject CreateFromAggregateRoot(ISourcedAggregateRoot aggregateRoot) { ISnapshotSerializer serializer = null; ApworksConfigSection config = AppRuntime.Instance.CurrentApplication.ConfigSource.Config; if (config.Serializers == null || config.Serializers.SnapshotSerializer == null || string.IsNullOrEmpty(config.Serializers.SnapshotSerializer.Provider) || string.IsNullOrWhiteSpace(config.Serializers.SnapshotSerializer.Provider)) { serializer = new SnapshotXmlSerializer(); } else { string typeName = config.Serializers.SnapshotSerializer.Provider; Type serializerType = Type.GetType(typeName); if (serializerType == null) { throw new InfrastructureException("The serializer defined by type '{0}' doesn't exist.", typeName); } serializer = (ISnapshotSerializer)Activator.CreateInstance(serializerType); } ISnapshot snapshot = aggregateRoot.CreateSnapshot(); return(new SnapshotDataObject { AggregateRootID = aggregateRoot.ID, AggregateRootType = aggregateRoot.GetType().AssemblyQualifiedName, Version = aggregateRoot.Version, Branch = Constants.ApplicationRuntime.DefaultBranch, SnapshotType = snapshot.GetType().AssemblyQualifiedName, Timestamp = snapshot.Timestamp, SnapshotData = serializer.Serialize(snapshot) }); }
public ShutdownManager( ILog log, ICandlesSubscriber candlesSubscriber, ISnapshotSerializer snapshotSerializer, ICandlesPersistenceQueueSnapshotRepository persistenceQueueSnapshotRepository, ICandlesPersistenceQueue persistenceQueue, ICandlesPersistenceManager persistenceManager, CandlesMigrationManager migrationManager, bool migrationEnabled) { if (log == null) { throw new ArgumentNullException(nameof(log)); } _log = log.CreateComponentScope(nameof(ShutdownManager)) ?? throw new InvalidOperationException("Couldn't create a component scope for logging."); _candlesSubcriber = candlesSubscriber ?? throw new ArgumentNullException(nameof(candlesSubscriber)); _snapshotSerializer = snapshotSerializer ?? throw new ArgumentNullException(nameof(snapshotSerializer)); _persistenceQueueSnapshotRepository = persistenceQueueSnapshotRepository ?? throw new ArgumentNullException(nameof(persistenceQueueSnapshotRepository)); _persistenceQueue = persistenceQueue ?? throw new ArgumentNullException(nameof(persistenceQueue)); _persistenceManager = persistenceManager ?? throw new ArgumentNullException(nameof(persistenceManager)); _migrationManager = migrationManager ?? throw new ArgumentNullException(nameof(migrationManager)); _migrationEnabled = migrationEnabled; }
/// <summary> /// Creates the snapshot data object from the aggregate root. /// </summary> /// <param name="aggregateRoot">The aggregate root for which the snapshot is being created.</param> /// <returns>The snapshot data object.</returns> public static SnapshotDataObject CreateFromAggregateRoot(ISourcedAggregateRoot aggregateRoot) { ISnapshotSerializer serializer = null; ApworksConfigSection config = AppRuntime.Instance.CurrentApplication.ConfigSource.Config; if (config.Serializers == null || config.Serializers.SnapshotSerializer == null || string.IsNullOrEmpty(config.Serializers.SnapshotSerializer.Provider) || string.IsNullOrWhiteSpace(config.Serializers.SnapshotSerializer.Provider)) { serializer = new SnapshotXmlSerializer(); } else { string typeName = config.Serializers.SnapshotSerializer.Provider; Type serializerType = Type.GetType(typeName); if (serializerType == null) throw new InfrastructureException("The serializer defined by type '{0}' doesn't exist.", typeName); serializer = (ISnapshotSerializer)Activator.CreateInstance(serializerType); } ISnapshot snapshot = aggregateRoot.CreateSnapshot(); return new SnapshotDataObject { AggregateRootID = aggregateRoot.ID, AggregateRootType = aggregateRoot.GetType().AssemblyQualifiedName, Version = aggregateRoot.Version, Branch = Constants.ApplicationRuntime.DefaultBranch, SnapshotType = snapshot.GetType().AssemblyQualifiedName, Timestamp = snapshot.Timestamp, SnapshotData = serializer.Serialize(snapshot) }; }
public SnapshotRecvChannel(SnapshotSerializer serializer) { _receivedSnapMap = new Dictionary <int, ISnapshot>(); _snapSerializer = serializer; }
/// <summary> /// Creates a new instance of the <see cref="JsonSnapshotComparer"/> /// </summary> /// <param name="snapshotAssert">The snapshot assert.</param> /// <param name="snapshotSerializer">The snapshot serializer.</param> public JsonSnapshotComparer( IAssert snapshotAssert, ISnapshotSerializer snapshotSerializer) { _snapshotAssert = snapshotAssert; _snapshotSerializer = snapshotSerializer; }
/// <summary> /// Initializes a new instance of <c>SnapshotDomainRepository</c> class. /// </summary> /// <param name="snapshotSerializer"></param> /// <param name="storage">The <see cref="Anycmd.Storage.IStorage"/> instance that is used /// by the current domain repository to manipulate snapshot data.</param> /// <param name="eventBus">The <see cref="Anycmd.Bus.IEventBus"/> instance to which /// the domain events are published.</param> public SnapshotDomainRepository(ISnapshotSerializer snapshotSerializer, IStorage storage, IEventBus eventBus) : base(eventBus) { this._snapshotSerializer = snapshotSerializer; this._storage = storage; }
/// <summary> /// 从给定的快照数据对象萃取得到快照对象。 /// </summary> /// <param name="serializer"></param> /// <param name="dataObject">快照数据对象</param> /// <returns>快照对象</returns> public static ISnapshot <TAggregateRootId> ExtractSnapshot <TAggregateRootId>(this ISnapshotSerializer serializer, SnapshotDataObject <TAggregateRootId> dataObject) { var snapshotType = Type.GetType(dataObject.SnapshotType); if (snapshotType == null) { return(null); } return((ISnapshot <TAggregateRootId>)serializer.Deserialize(snapshotType, dataObject.SnapshotData)); }
/// <summary> /// 为给定的聚合根实体创建快照数据对象。 /// </summary> /// <param name="serializer"></param> /// <param name="aggregateRoot">快照为该聚合根对象创建。</param> /// <returns>快照数据对象。</returns> public static SnapshotDataObject <TAggregateRootId> CreateFromAggregateRoot <TAggregateRootId>(this ISnapshotSerializer serializer, ISourcedAggregateRoot <TAggregateRootId> aggregateRoot) { var snapshot = aggregateRoot.CreateSnapshot(); return(new SnapshotDataObject <TAggregateRootId> { AggregateRootId = aggregateRoot.Id, AggregateRootType = aggregateRoot.GetType().AssemblyQualifiedName, Version = aggregateRoot.Version, Branch = Constants.ApplicationRuntime.DefaultBranch, SnapshotType = snapshot.GetType().AssemblyQualifiedName, Timestamp = snapshot.Timestamp, SnapshotData = serializer.Serialize(snapshot) }); }