Esempio n. 1
0
        public void VerifyIntegrity()
        {
            foreach (var value in Enum.GetValues(typeof(TimelineHistoricPeriod)))
            {
                if (HistoricPeriods.TryGetValue((TimelineHistoricPeriod)value, out var historicPeriod))
                {
                    if (historicPeriod == null)
                    {
                        HistoricPeriods[(TimelineHistoricPeriod)value] = new HistoricPeriod();
                    }

                    continue;
                }

                HistoricPeriods.Add((TimelineHistoricPeriod)value, new HistoricPeriod());
            }
        }
Esempio n. 2
0
        public void AddHistoricPeriod(TimelineHistoricPeriod historicPeriodEnum, HistoricPeriod historicPeriod)
        {
            if (historicPeriod == null)
            {
                return;
            }

            if (HistoricPeriods.ContainsKey(historicPeriodEnum))
            {
                HistoricPeriods[historicPeriodEnum] = historicPeriod;
            }
            else
            {
                HistoricPeriods.Add(historicPeriodEnum, historicPeriod);
            }

            foreach (var timelineEventPair in historicPeriod)
            {
                AllEventsList.Add(timelineEventPair.Value);
            }
        }