From 9a260312451b6d7d9e09f0cda5d277d12ffa15f9 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 20 Jul 2021 17:01:30 +0100 Subject: [PATCH] (#15) Document possible ArgumentOutOfRangeException --- X10D/src/Int16Extensions/Int16Extensions.cs | 10 ++++++++++ X10D/src/Int32Extensions/Int32Extensions.cs | 10 ++++++++++ X10D/src/Int64Extensions/Int64Extensions.cs | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/X10D/src/Int16Extensions/Int16Extensions.cs b/X10D/src/Int16Extensions/Int16Extensions.cs index 174f708..e340287 100644 --- a/X10D/src/Int16Extensions/Int16Extensions.cs +++ b/X10D/src/Int16Extensions/Int16Extensions.cs @@ -17,6 +17,11 @@ namespace X10D /// 1970, at 12:00 AM UTC). For Unix times before this date, its value is negative. /// /// A date and time value that represents the same moment in time as the Unix time. + /// + /// is less than -62,135,596,800,000. + /// -or- + /// is greater than 253,402,300,799,999. + /// public static DateTimeOffset FromUnixTimeMilliseconds(this short value) { return DateTimeOffset.FromUnixTimeMilliseconds(value); @@ -31,6 +36,11 @@ namespace X10D /// 12:00 AM UTC). For Unix times before this date, its value is negative. /// /// A date and time value that represents the same moment in time as the Unix time. + /// + /// is less than -62,135,596,800. + /// -or- + /// is greater than 253,402,300,799. + /// public static DateTimeOffset FromUnixTimeSeconds(this short value) { return DateTimeOffset.FromUnixTimeSeconds(value); diff --git a/X10D/src/Int32Extensions/Int32Extensions.cs b/X10D/src/Int32Extensions/Int32Extensions.cs index db5e36a..f7e66ee 100644 --- a/X10D/src/Int32Extensions/Int32Extensions.cs +++ b/X10D/src/Int32Extensions/Int32Extensions.cs @@ -17,6 +17,11 @@ namespace X10D /// 1970, at 12:00 AM UTC). For Unix times before this date, its value is negative. /// /// A date and time value that represents the same moment in time as the Unix time. + /// + /// is less than -62,135,596,800,000. + /// -or- + /// is greater than 253,402,300,799,999. + /// public static DateTimeOffset FromUnixTimeMilliseconds(this int value) { return DateTimeOffset.FromUnixTimeMilliseconds(value); @@ -31,6 +36,11 @@ namespace X10D /// 12:00 AM UTC). For Unix times before this date, its value is negative. /// /// A date and time value that represents the same moment in time as the Unix time. + /// + /// is less than -62,135,596,800. + /// -or- + /// is greater than 253,402,300,799. + /// public static DateTimeOffset FromUnixTimeSeconds(this int value) { return DateTimeOffset.FromUnixTimeSeconds(value); diff --git a/X10D/src/Int64Extensions/Int64Extensions.cs b/X10D/src/Int64Extensions/Int64Extensions.cs index fb32ddb..d5d13bd 100644 --- a/X10D/src/Int64Extensions/Int64Extensions.cs +++ b/X10D/src/Int64Extensions/Int64Extensions.cs @@ -17,6 +17,11 @@ namespace X10D /// 1970, at 12:00 AM UTC). For Unix times before this date, its value is negative. /// /// A date and time value that represents the same moment in time as the Unix time. + /// + /// is less than -62,135,596,800,000. + /// -or- + /// is greater than 253,402,300,799,999. + /// public static DateTimeOffset FromUnixTimeMilliseconds(this long value) { return DateTimeOffset.FromUnixTimeMilliseconds(value); @@ -31,6 +36,11 @@ namespace X10D /// 12:00 AM UTC). For Unix times before this date, its value is negative. /// /// A date and time value that represents the same moment in time as the Unix time. + /// + /// is less than -62,135,596,800. + /// -or- + /// is greater than 253,402,300,799. + /// public static DateTimeOffset FromUnixTimeSeconds(this long value) { return DateTimeOffset.FromUnixTimeSeconds(value);