Esempio n. 1
0
 public Period(IDateTime start, IDateTime end) : this()
 {
     StartTime = start;
     if (end != null)
     {
         EndTime = end;
         Duration = end.Subtract(start);
     }
 }
Esempio n. 2
0
 public Period(IDateTime start, IDateTime end) : this()
 {
     StartTime = start;
     if (end != null)
     {
         EndTime  = end;
         Duration = end.Subtract(start);
     }
 }
Esempio n. 3
0
        public Period(IDateTime start, IDateTime end)
        {
            if (end != null && end.LessThanOrEqual(start))
            {
                throw new ArgumentException($"Start time ( {start} ) must come before the end time ( {end} )");
            }

            StartTime = start;
            if (end == null)
            {
                return;
            }
            EndTime  = end;
            Duration = end.Subtract(start);
        }