1
Exception is not documented...
Problem reported by Ed Paay - 9/6/2017 at 11:58 AM
Submitted
I noticed that exceptions were not documented automatically in the following code.  Perhaps because GhostDoc does not yet support the newer $"" string format?
        /// <summary>Calculates the specified start.</summary>
        /// <param name="start">The start.</param>
        /// <param name="now">The now.</param>
        /// <param name="end">The end.</param>
        private void Calculate(DateTime start, DateTime now, DateTime end)
        {
            if (start >= end)
                throw new InvalidOperationException($"Epoch.Calculate: The Start ({start}) of the Epoch must be less than the End ({end}).");
            Period = end - start;
            End = end;
            Start = start;
            if (now < start)
                throw new InvalidOperationException($"Epoch.Calculate: The Now ({now}) value must fall inthe range of Start ({start}) and End ({end}) of the Epoch.");
            Now = now;
            // Calculate time span remaining
            Remaining = End - Now;
            Passed = Now - Start;
            PassedPC = Convert.ToInt32( Passed.Ticks / (Period.Ticks / 100L ) );
            RemainingPC = 100 - PassedPC;
        }
 

Reply to Thread