Scenario 1: simple condition
This:
if (!results.Any(r => condition))
throw new Exception("Error");
Becomes:
if (results.All(r => condition == false))
throw new Exception("Error");
or
if (results.All(r => !condition))
throw new Exception("Error");
Scenario 2: special case >, <, >= and <=
This:
if (!results.Any(r => r > 0))
throw new Exception("Error");
Becomes:
if (results.All(r => r <= 0))
throw new Exception("Error");
So it became more readable.
This is a refactoring, there is no diagnostic.
This is essentially a refactoring, so we are classifying it as a Hidden diagnostic.
Category is Refactoring.
Diagnostic id is: CC0043
Scenario 1: simple condition
This:
Becomes:
or
Scenario 2: special case
>,<,>=and<=This:
Becomes:
So it became more readable.
This is a refactoring, there is no diagnostic.
This is essentially a refactoring, so we are classifying it as a
Hiddendiagnostic.Category is
Refactoring.Diagnostic id is:
CC0043