Skip to content

[Suggestion] Simplify several checks for empty/null strings.Β #1878

@andrueastman

Description

@andrueastman

Several instances of the code in the 2.0.0 branch can be simplified from

if (string.IsNullOrEmpty(referenceId))
{
    Utils.CheckArgumentNullOrEmpty(referenceId);
}

to this

Utils.CheckArgumentNullOrEmpty(referenceId);

as CheckArgumentNullOrEmpty checks if the string is null or empty again before throwing.

Some examples can be found below

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions