Пример #1
0
 public AccountEntry PushAccountEntry(AccountEntry entry)
 {
     if (Process(entry) != null)
     {
         _Entries.WriteNext(entry);
         _NextToProcess++;
     }
     return(entry);
 }
Пример #2
0
 public PersistantChain(PersistantChain copied, ObjectStream <ChainChange> changes)
 {
     if (changes == null)
     {
         changes = new StreamObjectStream <ChainChange>();
     }
     AssertEmpty(changes);
     _Changes = changes;
     copied.Changes.Rewind();
     foreach (var change in copied.Changes.Enumerate())
     {
         if (_NextToProcess < copied._NextToProcess)
         {
             PushChange(change, null);
         }
         else
         {
             _Changes.WriteNext(change);
         }
     }
 }