/// <summary> /// Checks that the given timeout in within allowed bounds. /// </summary> /// <param name="timeout">The timeout to check.</param> /// <exception cref="ArgumentOutOfRangeException">The timeout is not within allowed bounds.</exception> internal static void CheckTimeoutBounds(TimeSpan timeout) { CommonUtility.AssertInBounds("Timeout", timeout, TimeSpan.FromSeconds(1), Constants.MaximumAllowedTimeout); }
public AsyncSemaphoreAsync(int initialCount) { CommonUtility.AssertInBounds("initialCount", initialCount, 0, int.MaxValue); this.count = initialCount; }