From: Stephen Toub Date: Wed, 10 Jul 2019 00:18:11 +0000 (-0400) Subject: Fix Timer argument exception parameter names (#25617) X-Git-Tag: accepted/tizen/unified/20191011.080124~150^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27790ab2dbee25d2e9c6fc41863aa7e983552a3f;p=platform%2Fupstream%2Fcoreclr.git Fix Timer argument exception parameter names (#25617) --- diff --git a/src/System.Private.CoreLib/shared/System/Threading/Timer.cs b/src/System.Private.CoreLib/shared/System/Threading/Timer.cs index dd21c42..7161f3d 100644 --- a/src/System.Private.CoreLib/shared/System/Threading/Timer.cs +++ b/src/System.Private.CoreLib/shared/System/Threading/Timer.cs @@ -735,15 +735,15 @@ namespace System.Threading { long dueTm = (long)dueTime.TotalMilliseconds; if (dueTm < -1) - throw new ArgumentOutOfRangeException(nameof(dueTm), SR.ArgumentOutOfRange_NeedNonNegOrNegative1); + throw new ArgumentOutOfRangeException(nameof(dueTime), SR.ArgumentOutOfRange_NeedNonNegOrNegative1); if (dueTm > MAX_SUPPORTED_TIMEOUT) - throw new ArgumentOutOfRangeException(nameof(dueTm), SR.ArgumentOutOfRange_TimeoutTooLarge); + throw new ArgumentOutOfRangeException(nameof(dueTime), SR.ArgumentOutOfRange_TimeoutTooLarge); long periodTm = (long)period.TotalMilliseconds; if (periodTm < -1) - throw new ArgumentOutOfRangeException(nameof(periodTm), SR.ArgumentOutOfRange_NeedNonNegOrNegative1); + throw new ArgumentOutOfRangeException(nameof(period), SR.ArgumentOutOfRange_NeedNonNegOrNegative1); if (periodTm > MAX_SUPPORTED_TIMEOUT) - throw new ArgumentOutOfRangeException(nameof(periodTm), SR.ArgumentOutOfRange_PeriodTooLarge); + throw new ArgumentOutOfRangeException(nameof(period), SR.ArgumentOutOfRange_PeriodTooLarge); TimerSetup(callback, state, (uint)dueTm, (uint)periodTm); } @@ -790,7 +790,7 @@ namespace System.Threading bool flowExecutionContext = true) { if (callback == null) - throw new ArgumentNullException(nameof(TimerCallback)); + throw new ArgumentNullException(nameof(callback)); _timer = new TimerHolder(new TimerQueueTimer(callback, state, dueTime, period, flowExecutionContext)); }