示例#1
0
 /// <summary>
 /// Throws an exception if percussion is not valid.
 /// </summary>
 /// <param name="percussion">The percussion to validate.</param>
 /// <exception cref="ArgumentOutOfRangeException">The percussion is out-of-range.
 /// </exception>
 public static void Validate(this Percussion percussion)
 {
     if (!percussion.IsValid())
     {
         throw new ArgumentOutOfRangeException("Percussion out of range");
     }
 }
示例#2
0
 /// <summary>
 ///     Throws an exception if percussion is not valid.
 /// </summary>
 /// <param name="percussion">The percussion to validate.</param>
 /// <exception cref="ArgumentOutOfRangeException">
 ///     The percussion is out-of-range.
 /// </exception>
 public static void Validate(this Percussion percussion)
 {
     if (!percussion.IsValid())
     {
         throw new ArgumentOutOfRangeException(nameof(percussion));
     }
 }