Exemplo n.º 1
0
        private void SaveSnapshot()
        {
            var state = GetState();

            if (state == null)
            {
                return;
            }

            var snapshotEvent = new SnapshotOffer()
            {
                State = state
            };

            Publish(snapshotEvent);
        }
Exemplo n.º 2
0
        private void SaveSnapshot()
        {
            var state = GetState();

            if (state == null)
            {
                return;
            }

            var snapshotEvent = new SnapshotOffer
            {
                State = state,
                // Use the current aggregate "event version" for the snapshot version as well.
                Version = Version
            };

            Publish(snapshotEvent);
        }