CheckId | NS4000 |
Category | Call configuration |
Calling substitute from within Returns
block.
A violation of this rule occurs when substitute setup is called within another substitute setup. See more on GitHub
To fix a violation of this rule, do not setup substitute within another substitute, or replace re-entrant substitute with lambda call.
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("Call configuration", "NS4000:Re-entrant substitute call.", Justification = "Reviewed")]
Or for a specific code block:
#pragma warning disable NS4000 // Re-entrant substitute call.
// the code which produces warning
#pragma warning restore NS4000 // Re-entrant substitute call.