Browse Source

Update documentation on Guard methods.

pull/600/head
Coen Munckhof 8 years ago
committed by Dirk Lemstra
parent
commit
c36f689072
  1. 4
      src/ImageSharp/Common/Helpers/DebugGuard.cs
  2. 8
      src/ImageSharp/Common/Helpers/Guard.cs

4
src/ImageSharp/Common/Helpers/DebugGuard.cs

@ -189,7 +189,7 @@ namespace SixLabors.ImageSharp
/// <param name="other">The 'other' span to compare 'target' to.</param>
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
/// <exception cref="ArgumentException">
/// <paramref name="target"/> is true
/// <paramref name="target"/> has a different size than <paramref name="other"/>
/// </exception>
[Conditional("DEBUG")]
public static void MustBeSameSized<T>(Span<T> target, Span<T> other, string parameterName)
@ -209,7 +209,7 @@ namespace SixLabors.ImageSharp
/// <param name="minSpan">The 'minSpan' span to compare 'target' to.</param>
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
/// <exception cref="ArgumentException">
/// <paramref name="target"/> is true
/// <paramref name="target"/> has less items than <paramref name="minSpan"/>
/// </exception>
[Conditional("DEBUG")]
public static void MustBeSizedAtLeast<T>(Span<T> target, Span<T> minSpan, string parameterName)

8
src/ImageSharp/Common/Helpers/Guard.cs

@ -207,14 +207,14 @@ namespace SixLabors.ImageSharp
}
/// <summary>
/// Verifies, that the `source` span has the length of 'minSpan', or longer.
/// Verifies, that the `source` span has the length of 'minLength', or longer.
/// </summary>
/// <typeparam name="T">The element type of the spans</typeparam>
/// <param name="source">The source span.</param>
/// <param name="minLength">The minimum length.</param>
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
/// <exception cref="ArgumentException">
/// <paramref name="source"/> is true
/// <paramref name="source"/> has less than <paramref name="minLength"/> items
/// </exception>
public static void MustBeSizedAtLeast<T>(ReadOnlySpan<T> source, int minLength, string parameterName)
{
@ -225,14 +225,14 @@ namespace SixLabors.ImageSharp
}
/// <summary>
/// Verifies, that the `source` span has the length of 'minSpan', or longer.
/// Verifies, that the `source` span has the length of 'minLength', or longer.
/// </summary>
/// <typeparam name="T">The element type of the spans</typeparam>
/// <param name="source">The target span.</param>
/// <param name="minLength">The minimum length.</param>
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
/// <exception cref="ArgumentException">
/// <paramref name="source"/> is true
/// <paramref name="source"/> has less than <paramref name="minLength"/> items
/// </exception>
public static void MustBeSizedAtLeast<T>(Span<T> source, int minLength, string parameterName)
{

Loading…
Cancel
Save