Beispiel #1
0
        public Drum(List <Isotope> initialContents = null)
        {
            NumberOfComponents = initialContents?.Count ?? 0;
            CurrentContents    = NumberOfComponents == 0 ? new List <Isotope>() : initialContents;

            History = new DrumHistory(new Drum(initialContents));
        }
Beispiel #2
0
        public void AddPeriod(DrumHistory historyToAdd)
        {
            // New entries with the same timestep value take precedence. Remove all pre-existing values.
            Log.RemoveAll(x => historyToAdd.Log.Exists(y => y.Time == x.Time));

            // Add new extension to history log.
            Log.AddRange(historyToAdd.Log);
            Log.Sort();
        }