Exemple #1
0
        public void AddTaxFacts(IList <int> list)
        {
            IntervalList intervals = list as IntervalList;

            if (intervals == null)
            {
                intervals = new IntervalList();
                foreach (var item in list)
                {
                    intervals.Add(item);
                }
            }
            //this.TaxFacts.Add(intervals);
            this.TaxFacts.Add((List <int>)list);
        }
Exemple #2
0
        /// <inheritdoc />
        public BoundedPeriodSet(DateTime from, DateTime?to = null)
        {
            Start <DateTime> start = new Start <DateTime>(from, Inclusivity.Inclusive);

            if (to.HasValue)
            {
                if (to.Value == from)
                {
                    IntervalList.Add(new DefaultDegenerateInterval <DateTime>(new Degenerate <DateTime>(from)));
                }
                else
                {
                    IntervalList.Add(new DefaultStartEndingInterval <DateTime>(start, new End <DateTime>(to.Value, Inclusivity.Exclusive)));
                }
            }
            else
            {
                IntervalList.Add(new DefaultStartingInterval <DateTime>(start));
            }
        }
Exemple #3
0
        /// <inheritdoc />
        public OpenPeriodSet(DateTime from, DateTime?to)
        {
            Start <DateTime> start = new Start <DateTime>(from, Inclusivity.Inclusive);

            if (to.HasValue)
            {
                if (to.Value == from)
                {
                    IntervalList.Add(new DegenerateOpenPeriod(new Degenerate <DateTime>(from)));
                }
                else
                {
                    IntervalList.Add(new StartEndingOpenPeriod(start, new End <DateTime>(to.Value, Inclusivity.Exclusive)));
                }
            }
            else
            {
                IntervalList.Add(new StartingOpenPeriod(start));
            }
        }