Skip to content

[CallerArgumentExpression] parameter should be the last one to allow passing custom message #362

@jvmlet

Description

@jvmlet

See the guards API below :

public static int Negative([JetBrainsNotNull] this IGuardClause guardClause,
            int input,
            [JetBrainsNotNull][JetBrainsInvokerParameterName][CallerArgumentExpression("input")] string? parameterName = null,
            string? message = null){
......
}

If I want to pass custom message I need to pass parameterName as well, which breaks the CallerArgumentExpression functionality.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions