Esempio n. 1
0
 public void addLocalHistoryEntry(LocalHistoryEntry entry)
 {
     D.assert(entry._owner == null);
     entry._owner = this;
     this._localHistory = this._localHistory ?? new List<LocalHistoryEntry>();
     var wasEmpty = this._localHistory.isEmpty();
     this._localHistory.Add(entry);
     if (wasEmpty) {
         this.changedInternalState();
     }
 }
Esempio n. 2
0
 public void removeLocalHistoryEntry(LocalHistoryEntry entry)
 {
     D.assert(entry != null);
     D.assert(entry._owner == this);
     D.assert(this._localHistory.Contains(entry));
     this._localHistory.Remove(entry);
     entry._owner = null;
     entry._notifyRemoved();
     if (this._localHistory.isEmpty()) {
         this.changedInternalState();
     }
 }
Esempio n. 3
0
 public void removeLocalHistoryEntry(LocalHistoryEntry entry)
 {
     D.assert(entry != null);
     D.assert(entry._owner == this);
     D.assert(_localHistory.Contains(entry));
     _localHistory.Remove(entry);
     entry._owner = null;
     entry._notifyRemoved();
     if (_localHistory.isEmpty())
     {
         if (SchedulerBinding.instance.schedulerPhase == SchedulerPhase.persistentCallbacks)
         {
             SchedulerBinding.instance.addPostFrameCallback((TimeSpan timestamp) => {
                 changedInternalState();
             });
         }
         else
         {
             changedInternalState();
         }
     }
 }