/[xmltv_parser]/trunk/GBPVRProgramDatabaseFixer/DateTimeRange.cs
ViewVC logotype

Annotation of /trunk/GBPVRProgramDatabaseFixer/DateTimeRange.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 163 - (hide annotations) (download)
Fri Mar 15 16:53:40 2013 UTC (7 years, 3 months ago) by william
File size: 1278 byte(s)
+ filter GBPVR Programs to match the date-range of the XMLTV Programs list

1 william 163 using System;
2     using System.Collections.Generic;
3     using System.Linq;
4     using System.Text;
5    
6     namespace GBPVRProgramDatabaseFixer
7     {
8     public interface IDateTimeRange
9     {
10     DateTime Start { get; }
11     DateTime End { get; }
12     void CopyTo(ref IDateTimeRange range);
13     //IDateTimeRange Copy();
14     }
15     public class DateTimeRange : IDateTimeRange
16     {
17     public static IDateTimeRange Create() { return new DateTimeRange(); }
18     public static IDateTimeRange Create(DateTime start, DateTime end) { return new DateTimeRange(start, end); }
19     public static IDateTimeRange Create(IDateTimeRange range) { return new DateTimeRange(range); }
20     protected DateTimeRange() : this(new DateTime(),new DateTime()) { }
21     protected DateTimeRange(DateTime start, DateTime end) { this.Start = start; this.End = end; }
22     protected DateTimeRange(IDateTimeRange range) : this(range.Start, range.End) { }
23     #region IDateTimeRange members
24     public DateTime Start { get; set; }
25     public DateTime End { get; set; }
26     public void CopyTo(ref IDateTimeRange range) { range = this.Copy(); }
27     #endregion
28     private IDateTimeRange Copy() { return new DateTimeRange(this); }
29     }
30     }

  ViewVC Help
Powered by ViewVC 1.1.22