Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use langword instead of <c> for C# keywords #2070

Merged
merged 1 commit into from Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 14 additions & 14 deletions Src/FluentAssertions/AssertionExtensions.cs
Expand Up @@ -39,8 +39,8 @@ public static class AssertionExtensions
/// Invokes the specified action on a subject so that you can chain it
/// with any of the assertions from <see cref="ActionAssertions"/>
/// </summary>
/// <exception cref="ArgumentNullException"><paramref name="subject"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="subject"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <see langword="null"/>.</exception>
[Pure]
public static Action Invoking<T>(this T subject, Action<T> action)
{
Expand All @@ -54,8 +54,8 @@ public static Action Invoking<T>(this T subject, Action<T> action)
/// Invokes the specified action on a subject so that you can chain it
/// with any of the assertions from <see cref="FunctionAssertions{T}"/>
/// </summary>
/// <exception cref="ArgumentNullException"><paramref name="subject"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="subject"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <see langword="null"/>.</exception>
[Pure]
public static Func<TResult> Invoking<T, TResult>(this T subject, Func<T, TResult> action)
{
Expand Down Expand Up @@ -113,8 +113,8 @@ public static Func<Task> Awaiting<T>(this T subject, Func<T, ValueTask> action)
/// <returns>
/// Returns an object for asserting that the execution time matches certain conditions.
/// </returns>
/// <exception cref="ArgumentNullException"><paramref name="subject"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="subject"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <see langword="null"/>.</exception>
[MustUseReturnValue /* do not use Pure because this method executes the action before returning to the caller */]
public static MemberExecutionTime<T> ExecutionTimeOf<T>(this T subject, Expression<Action<T>> action,
StartTimer createTimer = null)
Expand All @@ -134,7 +134,7 @@ public static Func<Task> Awaiting<T>(this T subject, Func<T, ValueTask> action)
/// <returns>
/// Returns an object for asserting that the execution time matches certain conditions.
/// </returns>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <see langword="null"/>.</exception>
[MustUseReturnValue /* do not use Pure because this method executes the action before returning to the caller */]
public static ExecutionTime ExecutionTime(this Action action, StartTimer createTimer = null)
{
Expand All @@ -150,7 +150,7 @@ public static ExecutionTime ExecutionTime(this Action action, StartTimer createT
/// <returns>
/// Returns an object for asserting that the execution time matches certain conditions.
/// </returns>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="action"/> is <see langword="null"/>.</exception>
[MustUseReturnValue /* do not use Pure because this method executes the action before returning to the caller */]
public static ExecutionTime ExecutionTime(this Func<Task> action)
{
Expand Down Expand Up @@ -229,7 +229,7 @@ public static BufferedStreamAssertions Should(this BufferedStream actualValue)

/// <summary>
/// Forces enumerating a collection. Should be used to assert that a method that uses the
/// <c>yield</c> keyword throws a particular exception.
/// <see langword="yield"/> keyword throws a particular exception.
/// </summary>
[Pure]
public static Action Enumerating(this Func<IEnumerable> enumerable)
Expand All @@ -239,7 +239,7 @@ public static Action Enumerating(this Func<IEnumerable> enumerable)

/// <summary>
/// Forces enumerating a collection. Should be used to assert that a method that uses the
/// <c>yield</c> keyword throws a particular exception.
/// <see langword="yield"/> keyword throws a particular exception.
/// </summary>
[Pure]
public static Action Enumerating<T>(this Func<IEnumerable<T>> enumerable)
Expand All @@ -249,7 +249,7 @@ public static Action Enumerating<T>(this Func<IEnumerable<T>> enumerable)

/// <summary>
/// Forces enumerating a collection of the provided <paramref name="subject"/>.
/// Should be used to assert that a method that uses the <c>yield</c> keyword throws a particular exception.
/// Should be used to assert that a method that uses the <see langword="yield"/> keyword throws a particular exception.
/// </summary>
/// <param name="subject">The object that exposes the method or property.</param>
/// <param name="enumerable">A reference to the method or property to force enumeration of.</param>
Expand Down Expand Up @@ -783,7 +783,7 @@ public static TypeAssertions Should(this Type subject)
/// Returns a <see cref="TypeAssertions"/> object that can be used to assert the
/// current <see cref="Type"/>.
/// </summary>
/// <exception cref="ArgumentNullException"><paramref name="typeSelector"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="typeSelector"/> is <see langword="null"/>.</exception>
[Pure]
public static TypeSelectorAssertions Should(this TypeSelector typeSelector)
{
Expand Down Expand Up @@ -818,7 +818,7 @@ public static MethodInfoAssertions Should(this MethodInfo methodInfo)
/// current <see cref="MethodInfoSelector"/>.
/// </summary>
/// <seealso cref="TypeAssertions"/>
/// <exception cref="ArgumentNullException"><paramref name="methodSelector"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="methodSelector"/> is <see langword="null"/>.</exception>
[Pure]
public static MethodInfoSelectorAssertions Should(this MethodInfoSelector methodSelector)
{
Expand All @@ -843,7 +843,7 @@ public static PropertyInfoAssertions Should(this PropertyInfo propertyInfo)
/// current <see cref="PropertyInfoSelector"/>.
/// </summary>
/// <seealso cref="TypeAssertions"/>
/// <exception cref="ArgumentNullException"><paramref name="propertyInfoSelector"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="propertyInfoSelector"/> is <see langword="null"/>.</exception>
[Pure]
public static PropertyInfoSelectorAssertions Should(this PropertyInfoSelector propertyInfoSelector)
{
Expand Down