/// <summary> /// Renders a skin parameter. /// </summary> /// <param name="skinParameter">The skin parameter.</param> /// <param name="value">The value of the skin parameter.</param> /// <exception cref="ArgumentNullException"><paramref name="stringBuilder"/> is <c>null</c>.</exception> /// <exception cref="ArgumentOutOfRangeException"><paramref name="skinParameter"/> is not a <see cref="SkinParameter"/> value.</exception> public static void SkinParameter(this StringBuilder stringBuilder, SkinParameter skinParameter, string value) { if (!Enum.IsDefined(typeof(SkinParameter), skinParameter)) { throw new ArgumentOutOfRangeException(nameof(skinParameter), "A defined enum value should be provided"); } stringBuilder.SkinParameter(skinParameter.ToString(), value); }
/// <summary> /// Renders a skin parameter. /// </summary> /// <param name="skinParameter">The skin parameter.</param> /// <param name="value">The value of the skin parameter.</param> /// <exception cref="ArgumentNullException"><paramref name="stringBuilder"/> is <c>null</c>.</exception> /// <exception cref="ArgumentOutOfRangeException"><paramref name="skinParameter"/> is not a <see cref="SkinParameter"/> value.</exception> public static void SkinParameter(this StringBuilder stringBuilder, SkinParameter skinParameter, bool value) { stringBuilder.SkinParameter(skinParameter.ToString(), value.ToString().ToLowerInvariant()); }
/// <summary> /// Renders a skin parameter. /// </summary> /// <param name="skinParameter">The skin parameter.</param> /// <param name="value">The value of the skin parameter.</param> /// <exception cref="ArgumentNullException"><paramref name="stringBuilder"/> is <c>null</c>.</exception> /// <exception cref="ArgumentOutOfRangeException"><paramref name="skinParameter"/> is not a <see cref="SkinParameter"/> value.</exception> public static void SkinParameter(this StringBuilder stringBuilder, SkinParameter skinParameter, int value) { stringBuilder.SkinParameter(skinParameter.ToString(), value.ToString()); }