Beispiel #1
0
 public void ClearStateHistory()
 {
     if (_states.Any())
     {
         StateManagerState power = _states.Values.First(s => s.Frame == 0);
         _states.Clear();
         SetState(0, power.State);
         Used = (ulong)power.State.Length;
         NdbDatabase?.Clear();
     }
 }
Beispiel #2
0
        public void ClearStateHistory()
        {
            if (_states.Any())
            {
                var temp_state          = _states.Values;
                StateManagerState power = null;
                if (temp_state[0].Frame == 0)
                {
                    power = _states.Values.First(s => s.Frame == 0);
                }
                else
                {
                    power = _states.Values[0];
                }

                _states.Clear();
                SetState(0, power.State);
                Used = (ulong)power.State.Length;
                NdbDatabase?.Clear();
            }
        }
Beispiel #3
0
 public void Dispose()
 {
     // States and BranchStates don't need cleaning because they would only contain an ndbdatabase entry which was demolished by the below
     NdbDatabase?.Dispose();
 }
Beispiel #4
0
 private void ClearDiskStates()
 {
     NdbDatabase?.Clear();
 }