Esempio n. 1
0
        public void InsertRun(DataRun existingRun, DataRun newRun)
        {
            int idx = DataRuns.IndexOf(existingRun);

            if (idx < 0)
            {
                throw new ArgumentException("Attempt to replace non-existant run", nameof(existingRun));
            }

            DataRuns.Insert(idx + 1, newRun);
        }
Esempio n. 2
0
        public void ReplaceRun(DataRun oldRun, DataRun newRun)
        {
            int idx = DataRuns.IndexOf(oldRun);

            if (idx < 0)
            {
                throw new ArgumentException("Attempt to replace non-existant run", nameof(oldRun));
            }

            DataRuns[idx] = newRun;
        }
Esempio n. 3
0
        public int RemoveRun(DataRun run)
        {
            int idx = DataRuns.IndexOf(run);

            if (idx < 0)
            {
                throw new ArgumentException("Attempt to remove non-existant run", nameof(run));
            }

            DataRuns.RemoveAt(idx);
            return(idx);
        }