Skip to content

Commit

Permalink
Add inlining suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
craigktreasure committed Sep 23, 2023
1 parent 7fae884 commit 6d6258e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Treasure.Utils.Argument/Argument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static void MarkUsed(object? _)
/// <param name="value">The value.</param>
/// <param name="name">The argument name.</param>
/// <returns>The value if not null.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T NotNull<T>([NotNull] T? value, [CallerArgumentExpression(nameof(value))] string name = "") where T : class
{
#if NET6_0_OR_GREATER
Expand All @@ -45,6 +46,7 @@ public static T NotNull<T>([NotNull] T? value, [CallerArgumentExpression(nameof(
/// <param name="value">The value.</param>
/// <param name="name">The argument name.</param>
/// <returns><see cref="string"/>.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string NotNullOrEmpty([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string name = "")
{
#if NET7_0_OR_GREATER
Expand All @@ -70,6 +72,7 @@ public static string NotNullOrEmpty([NotNull] string? value, [CallerArgumentExpr
/// <param name="value">The value.</param>
/// <param name="name">The argument name.</param>
/// <returns><see cref="string"/>.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string NotNullOrWhiteSpace([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string name = "")
{
if (value is null)
Expand Down

0 comments on commit 6d6258e

Please sign in to comment.