bkoelman / CSharpGuidelinesAnalyzer

Reports diagnostics for C# coding guidelines that are not already covered by Resharper.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Override AV1561:MaxParameterCount for constructors

bkoelman opened this issue · comments

Extend configuration to provide a different (typically higher) value for the number of parameters in constructor declarations. If omitted, the same value will be used as for normal methods.

In dependency injection scenarios, the number of constructor parameters can be large due to internal dependencies. To keep systems composable, it is usually better to have many small dependencies instead of one large does-everything dependency.

Example:

  <setting rule="AV1561" name="MaxParameterCount" value="5" />
  <setting rule="AV1561" name="MaxConstructorParameterCount" value="8" />