コード例 #1
0
ファイル: CalDateTime.cs プロジェクト: woehrl01/ical.net
 private bool Equals(CalDateTime other)
 {
     return(Value.Equals(other.Value) &&
            HasDate == other.HasDate &&
            AsUtc.Equals(other.AsUtc) &&
            string.Equals(TzId, other.TzId, StringComparison.OrdinalIgnoreCase));
 }
コード例 #2
0
ファイル: PeriodList.cs プロジェクト: vijaydeep/ical.net
        public List <Period> Evaluate(CalDateTime startDate, CalDateTime fromDate, CalDateTime endDate)
        {
            var periods = new List <Period>(Periods.Count);

            if (startDate > fromDate)
            {
                fromDate = startDate;
            }

            if (endDate < fromDate || fromDate > endDate)
            {
                return(periods);
            }

            var uncollectedPeriodQuery = from Period p in Periods
                                         where !periods.Contains(p)
                                         select p;

            periods.AddRange(uncollectedPeriodQuery);
            return(periods);
        }