public static ValidateTarget <double?> IsPositiveInfinity([ValidatedNotNull] this ValidateTarget <double?> target, Func <string> getErrorMessage = null)
        {
            if (!target.Value.HasValue || !double.IsPositiveInfinity(target.Value.Value))
            {
                ExceptionFactory.ThrowException(target.Traits.OutOfRangeExceptionType, getErrorMessage != null ? getErrorMessage.Invoke() : ErrorMessageFactory.ShouldBePositiveInfinity(target));
            }

            return(target);
        }