Skip to content

Commit

Permalink
Merge pull request #55 from bjm-csse/feature/XML-docUpdate
Browse files Browse the repository at this point in the history
Updated XML documentation syntax.
  • Loading branch information
AArnott authored Oct 9, 2020
2 parents f8923bc + efe351e commit 6886b5c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
16 changes: 8 additions & 8 deletions src/Validation/Assumes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Validation
public static partial class Assumes
{
/// <summary>
/// Throws <see cref="InternalErrorException" /> if the specified value is null.
/// Throws <see cref="InternalErrorException" /> if the specified value is <see langword="null"/>.
/// </summary>
/// <typeparam name="T">The type of value to test.</typeparam>
[DebuggerStepThrough]
Expand All @@ -30,7 +30,7 @@ public static void NotNull<T>([ValidatedNotNull, NotNull] T? value)
}

/// <summary>
/// Throws <see cref="InternalErrorException" /> if the specified value is null.
/// Throws <see cref="InternalErrorException" /> if the specified value is <see langword="null"/>.
/// </summary>
/// <typeparam name="T">The type of value to test.</typeparam>
[DebuggerStepThrough]
Expand All @@ -42,7 +42,7 @@ public static void NotNull<T>([ValidatedNotNull, NotNull] T? value)
}

/// <summary>
/// Throws <see cref="InternalErrorException" /> if the specified value is null or empty.
/// Throws <see cref="InternalErrorException" /> if the specified value is <see langword="null"/> or empty.
/// </summary>
[DebuggerStepThrough]
public static void NotNullOrEmpty([ValidatedNotNull, NotNull] string? value)
Expand All @@ -53,7 +53,7 @@ public static void NotNullOrEmpty([ValidatedNotNull, NotNull] string? value)
}

/// <summary>
/// Throws <see cref="InternalErrorException" /> if the specified value is null or empty.
/// Throws <see cref="InternalErrorException" /> if the specified value is <see langword="null"/> or empty.
/// </summary>
/// <typeparam name="T">The type of value to test.</typeparam>
[DebuggerStepThrough]
Expand All @@ -64,7 +64,7 @@ public static void NotNullOrEmpty<T>([ValidatedNotNull, NotNull] ICollection<T>?
}

/// <summary>
/// Throws <see cref="InternalErrorException" /> if the specified value is null or empty.
/// Throws <see cref="InternalErrorException" /> if the specified value is <see langword="null"/> or empty.
/// </summary>
/// <typeparam name="T">The type of value to test.</typeparam>
[DebuggerStepThrough]
Expand All @@ -75,7 +75,7 @@ public static void NotNullOrEmpty<T>([ValidatedNotNull, NotNull] IEnumerable<T>?
}

/// <summary>
/// Throws <see cref="InternalErrorException" /> if the specified value is not null.
/// Throws <see cref="InternalErrorException" /> if the specified value is not <see langword="null"/>.
/// </summary>
/// <typeparam name="T">The type of value to test.</typeparam>
[DebuggerStepThrough]
Expand All @@ -87,7 +87,7 @@ public static void Null<T>(T? value)
}

/// <summary>
/// Throws <see cref="InternalErrorException" /> if the specified value is not null.
/// Throws <see cref="InternalErrorException" /> if the specified value is not <see langword="null"/>.
/// </summary>
/// <typeparam name="T">The type of value to test.</typeparam>
[DebuggerStepThrough]
Expand Down Expand Up @@ -241,7 +241,7 @@ public static T NotReachable<T>()
}

/// <summary>
/// Verifies that a value is not null, and throws <see cref="InternalErrorException" /> about a missing service otherwise.
/// Verifies that a value is not <see langword="null"/>, and throws <see cref="InternalErrorException" /> about a missing service otherwise.
/// </summary>
/// <typeparam name="T">The interface of the imported part.</typeparam>
[DebuggerStepThrough]
Expand Down
2 changes: 1 addition & 1 deletion src/Validation/Report.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Validation
public static class Report
{
/// <summary>
/// Verifies that a value is not null, and reports an error about a missing MEF component otherwise.
/// Verifies that a value is not <see langword="null"/>, and reports an error about a missing MEF component otherwise.
/// </summary>
/// <typeparam name="T">The interface of the imported part.</typeparam>
[Conditional("DEBUG")]
Expand Down
48 changes: 24 additions & 24 deletions src/Validation/Requires.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ namespace Validation
public static class Requires
{
/// <summary>
/// Throws an exception if the specified parameter's value is null.
/// Throws an exception if the specified parameter's value is <see langword="null"/>.
/// </summary>
/// <typeparam name="T">The type of the parameter.</typeparam>
/// <param name="value">The value of the argument.</param>
/// <param name="parameterName">The name of the parameter to include in any thrown exception.</param>
/// <returns>The value of the parameter.</returns>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <see langword="null"/>.</exception>
[DebuggerStepThrough]
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static T NotNull<T>([ValidatedNotNull, NotNull] T value, string? parameterName)
Expand Down Expand Up @@ -58,11 +58,11 @@ public static IntPtr NotNull(IntPtr value, string? parameterName)
}

/// <summary>
/// Throws an exception if the specified parameter's value is null.
/// Throws an exception if the specified parameter's value is <see langword="null"/>.
/// </summary>
/// <param name="value">The value of the argument.</param>
/// <param name="parameterName">The name of the parameter to include in any thrown exception.</param>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <see langword="null"/>.</exception>
/// <remarks>
/// This method allows async methods to use Requires.NotNull without having to assign the result
/// to local variables to avoid C# warnings.
Expand All @@ -78,12 +78,12 @@ public static void NotNull([ValidatedNotNull, NotNull] Task value, string? param
}

/// <summary>
/// Throws an exception if the specified parameter's value is null.
/// Throws an exception if the specified parameter's value is <see langword="null"/>.
/// </summary>
/// <typeparam name="T">The type of the return value of the task.</typeparam>
/// <param name="value">The value of the argument.</param>
/// <param name="parameterName">The name of the parameter to include in any thrown exception.</param>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <see langword="null"/>.</exception>
/// <remarks>
/// This method allows async methods to use Requires.NotNull without having to assign the result
/// to local variables to avoid C# warnings.
Expand All @@ -99,16 +99,16 @@ public static void NotNull<T>([ValidatedNotNull, NotNull] Task<T> value, string?
}

/// <summary>
/// Throws an exception if the specified parameter's value is null.
/// Throws an exception if the specified parameter's value is <see langword="null"/>.
/// </summary>
/// <typeparam name="T">The type of the parameter.</typeparam>
/// <param name="value">The value of the argument.</param>
/// <param name="parameterName">The name of the parameter to include in any thrown exception.</param>
/// <returns>The value of the parameter.</returns>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <see langword="null"/>.</exception>
/// <remarks>
/// This method exists for callers who themselves only know the type as a generic parameter which
/// may or may not be a class, but certainly cannot be null.
/// may or may not be a class, but certainly cannot be <see langword="null"/>.
/// </remarks>
[DebuggerStepThrough]
public static T NotNullAllowStructs<T>([ValidatedNotNull, NotNull] T value, string? parameterName)
Expand All @@ -122,11 +122,11 @@ public static T NotNullAllowStructs<T>([ValidatedNotNull, NotNull] T value, stri
}

/// <summary>
/// Throws an exception if the specified parameter's value is null or empty.
/// Throws an exception if the specified parameter's value is <see langword="null"/> or empty.
/// </summary>
/// <param name="value">The value of the argument.</param>
/// <param name="parameterName">The name of the parameter to include in any thrown exception.</param>
/// <exception cref="ArgumentException">Thrown if <paramref name="value"/> is <c>null</c> or empty.</exception>
/// <exception cref="ArgumentException">Thrown if <paramref name="value"/> is <see langword="null"/> or empty.</exception>
[DebuggerStepThrough]
public static void NotNullOrEmpty([ValidatedNotNull, NotNull] string value, string? parameterName)
{
Expand All @@ -145,11 +145,11 @@ public static void NotNullOrEmpty([ValidatedNotNull, NotNull] string value, stri
}

/// <summary>
/// Throws an exception if the specified parameter's value is null, empty, or whitespace.
/// Throws an exception if the specified parameter's value is <see langword="null"/>, empty, or whitespace.
/// </summary>
/// <param name="value">The value of the argument.</param>
/// <param name="parameterName">The name of the parameter to include in any thrown exception.</param>
/// <exception cref="ArgumentException">Thrown if <paramref name="value"/> is <c>null</c> or empty.</exception>
/// <exception cref="ArgumentException">Thrown if <paramref name="value"/> is <see langword="null"/> or empty.</exception>
[DebuggerStepThrough]
public static void NotNullOrWhiteSpace([ValidatedNotNull, NotNull] string value, string? parameterName)
{
Expand All @@ -173,7 +173,7 @@ public static void NotNullOrWhiteSpace([ValidatedNotNull, NotNull] string value,
}

/// <summary>
/// Throws an exception if the specified parameter's value is null,
/// Throws an exception if the specified parameter's value is <see langword="null"/>,
/// has no elements.
/// </summary>
/// <param name="values">The value of the argument.</param>
Expand Down Expand Up @@ -201,7 +201,7 @@ public static void NotNullOrEmpty([ValidatedNotNull, NotNull] IEnumerable values
}

/// <summary>
/// Throws an exception if the specified parameter's value is null,
/// Throws an exception if the specified parameter's value is <see langword="null"/>,
/// has no elements.
/// </summary>
/// <typeparam name="T">The type produced by the enumeration.</typeparam>
Expand All @@ -227,8 +227,8 @@ public static void NotNullOrEmpty<T>([ValidatedNotNull, NotNull] IEnumerable<T>
}

/// <summary>
/// Throws an exception if the specified parameter's value is null,
/// has no elements or has an element with a null value.
/// Throws an exception if the specified parameter's value is <see langword="null"/>,
/// has no elements or has an element with a <see langword="null"/> value.
/// </summary>
/// <typeparam name="T">The type of the elements in the sequence.</typeparam>
/// <param name="values">The value of the argument.</param>
Expand Down Expand Up @@ -264,8 +264,8 @@ public static void NotNullEmptyOrNullElements<T>([ValidatedNotNull, NotNull] IEn
}

/// <summary>
/// Throws an exception if the specified parameter's value is not null
/// <em>and</em> has an element with a null value.
/// Throws an exception if the specified parameter's value is not <see langword="null"/>
/// <em>and</em> has an element with a <see langword="null"/> value.
/// </summary>
/// <typeparam name="T">The type of the elements in the sequence.</typeparam>
/// <param name="values">The value of the argument.</param>
Expand Down Expand Up @@ -427,7 +427,7 @@ public static void Defined<TEnum>(TEnum value, string parameterName)
/// <typeparam name="T">The type of the parameter.</typeparam>
/// <param name="value">The value of the argument.</param>
/// <param name="parameterName">The name of the parameter to include in any thrown exception.</param>
/// <exception cref="ArgumentException">Thrown if <paramref name="value"/> is <c>null</c> or empty.</exception>
/// <exception cref="ArgumentException">Thrown if <paramref name="value"/> is <see langword="null"/> or empty.</exception>
[DebuggerStepThrough]
public static void NotDefault<T>(T value, string parameterName)
where T : struct
Expand Down Expand Up @@ -457,8 +457,8 @@ public static void That([DoesNotReturnIf(false)] bool condition, string? paramet
}

/// <summary>
/// Throws an exception if <paramref name="values"/> is null,
/// <paramref name="predicate"/> is null, or if <paramref name="values"/> is not null
/// Throws an exception if <paramref name="values"/> is <see langword="null"/>,
/// <paramref name="predicate"/> is <see langword="null"/>, or if <paramref name="values"/> is not <see langword="null"/>
/// <em>and</em> has an element which does not match the given predicate.
/// </summary>
/// <typeparam name="T">The type of the elements in the sequence.</typeparam>
Expand Down Expand Up @@ -494,8 +494,8 @@ public static void ValidElements<T>([ValidatedNotNull] IEnumerable<T> values, Pr
}

/// <summary>
/// Throws an exception if <paramref name="values"/> is null,
/// <paramref name="predicate"/> is null, or if <paramref name="values"/> is not null
/// Throws an exception if <paramref name="values"/> is <see langword="null"/>,
/// <paramref name="predicate"/> is <see langword="null"/>, or if <paramref name="values"/> is not <see langword="null"/>
/// <em>and</em> has an element which does not match the given predicate.
/// </summary>
/// <typeparam name="T">The type of the elements in the sequence.</typeparam>
Expand Down
38 changes: 19 additions & 19 deletions src/Validation/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6886b5c

Please sign in to comment.