public static ReadOnlySpan <T> MustBeShorterThanOrEqualTo <T>(this ReadOnlySpan <T> parameter, int length, ReadOnlySpanExceptionFactory <T, int> exceptionFactory)
 {
     if (parameter.Length > length)
     {
         Throw.CustomSpanException(exceptionFactory, parameter, length);
     }
     return(parameter);
 }
 public static ReadOnlySpan <T> MustHaveLength <T>(this ReadOnlySpan <T> parameter, int length, ReadOnlySpanExceptionFactory <T, int> exceptionFactory)
 {
     if (parameter.Length != length)
     {
         Throw.CustomSpanException(exceptionFactory, parameter, length);
     }
     return(parameter);
 }