} // Intersection protected virtual TDisjointIntervals <DateTime> Difference(DateInterval other) { TDisjointIntervals <DateTime> oDiff = base.Difference(other); if (oDiff == null) { return(null); } var oResult = new TDisjointIntervals <DateTime>(); foreach (TInterval <DateTime> i in oDiff) { oResult.Add(new DateInterval(i)); } return(oResult); } // Difference
} // Add public virtual TDisjointIntervals <TFinite> Add(TDisjointIntervals <TFinite> oSet) { if (oSet == null) { return(this); } foreach (TInterval <TFinite> oInterval in oSet) { try { this.Add(oInterval); } catch { // Silently ignore. } // try } // foreach return(this); } // Add