Skip to content

Create Snapshot with CommandInterpreter pattern? #66

Answered by sakno
datasatanic asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @datasatanic , you need to use CommandHandlerAttribute with IsSnapshotHandler as mentioned in the documentation. This allows to capture snapshot entry when replaying log at application startup. SnapshotBuilder is ephemeral log entry so you need it only for implementing snapshot construction logic. Inside of snapshot builder you can construct a command representing the snapshot and call your formatter from WriteToAsync implementation.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by datasatanic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #65 on May 25, 2021 14:04.