Skip to content

Consistency: Chains a call to NotNull #45

Description

@scottdorman

In all of the other methods that validate the parameter is not null, we're explicitly testing if (value is null) with a comment that reads

// To whoever is doing random code cleaning:
// Consider the performance when changing the code to delegate to NotNull.
// In general do not chain call to another function, check first and return as earlier as possible.

However, in Requires.NotNullOrEmpty we don't do that and instead, call NotNull. Should we change this so it's consistent?

NotNull(values, parameterName);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions