Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.18 KB

File metadata and controls

38 lines (28 loc) · 1.18 KB

NS3003

CheckId NS3003
Category Argument specification

Cause

Accessing call argument by type which is used multiple times in invocation.

Rule description

A violation of this rule occurs when CallInfo tries to access argument in call by type which is used multiple times in method arguments.

How to fix violations

To fix a violation of this rule, access call argument by type which is unique in method arguments or access call argument by position.

How to suppress violations

This warning can be suppressed by disabling the warning in the ruleset file for the project. The warning can also be suppressed programmatically for an assembly:

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Argument specification", "NS3003:There is more than one argument of given type to this call.", Justification = "Reviewed")]

Or for a specific code block:

#pragma warning disable NS3003 // There is more than one argument of given type to this call.
// the code which produces warning
#pragma warning restore NS3003 // There is more than one argument of given type to this call.