Example #1
0
        public PayAsYouGoAccountSnapshot GetPayAsYouGoAccountSnapShot()
        { 
            var snapshot = new PayAsYouGoAccountSnapshot();

            // Save all state

            snapshot.Version = Version;

            return snapshot;
        }
Example #2
0
        public PayAsYouGoAccountSnapshot GetPayAsYouGoAccountSnapShot()
        {
            var snapshot = new PayAsYouGoAccountSnapshot();

            // Save all state

            snapshot.Version = Version;

            return(snapshot);
        }
        public void SaveSnapshot(PayAsYouGoAccountSnapshot snapshot, PayAsYouGoAccount payAsYouGoAccount)
        {
            var streamName = StreamNameFor(payAsYouGoAccount.Id);

            _eventStore.AddSnapshot<PayAsYouGoAccountSnapshot>(streamName, snapshot);
        }
 public PayAsYouGoAccount(PayAsYouGoAccountSnapshot snapshot)
 {
     Version        = snapshot.Version;
     InitialVersion = snapshot.Version;
     _credit        = new Money(snapshot.Credit);
 }
Example #5
0
 public PayAsYouGoAccount(PayAsYouGoAccountSnapshot snapShot)
 {
     // Restore all state
     Version = snapShot.Version;
 }
Example #6
0
 public PayAsYouGoAccount(PayAsYouGoAccountSnapshot snapShot)
 {
     // Restore all state
     Version = snapShot.Version;
 }
Example #7
0
 public PayAsYouGoAccount(PayAsYouGoAccountSnapshot snapshot)
 {
     Version = snapshot.Version;
     InitialVersion = snapshot.Version;
     _credit = new Money(snapshot.Credit);
 }