public static ThrowArgumentOutOfRangeException ( string paramName, string message ) : void | ||
paramName | string | |
message | string | |
리턴 | void |
/// <summary> /// Determines whether the specified parameter is greater than zero. /// </summary> /// <param name="param">The parameter.</param> /// <param name="paramName">The name of the parameter.</param> /// <exception cref="ArgumentOutOfRangeException">The parameter is less than or equal to zero.</exception> public static void IsPositive(int param, string paramName) { if (param <= 0) { ExceptionUtil.ThrowArgumentOutOfRangeException(paramName, Resources.ParameterMustBePositive); } }
/// <summary> /// Sets the encoder lossy quality. /// </summary> /// <param name="quality">The quality.</param> /// <exception cref="ArgumentOutOfRangeException">The quality parameter is not in the range of [0, 100] inclusive.</exception> /// <exception cref="HeifException">A LibHeif error occurred.</exception> /// <exception cref="ObjectDisposedException">The object has been disposed.</exception> public void SetLossyQuality(int quality) { if (quality < 0 || quality > 100) { ExceptionUtil.ThrowArgumentOutOfRangeException(nameof(quality), "Must be in the range of [0, 100]."); } VerifyNotDisposed(); var error = LibHeifNative.heif_encoder_set_lossy_quality(this.encoder, quality); error.ThrowIfError(); }