Beispiel #1
0
            public ScratchBatch(Func <string> source)
                : base(source)
            {
                _stamp = DateTime.Parse(source());
                int count = int.Parse(source());

                for (int i = 0; i < count; ++i)
                {
                    _updates.Add(ScratchUpdate.Load(source));
                }
            }
Beispiel #2
0
 public RealScratchPage(Func <string> source)
 {
     for (;;)
     {
         try
         {
             ScratchUpdate up = ScratchUpdate.Load(source);
             _text = up.Apply(_text);
             _updates.Add(up);
         }
         catch (EndOfStreamException)
         {
             break;
         }
     }
     _lastSave = _updates.Count;
 }