Bug description
VSTHRD010 is not reported when pattern matching.
Repro steps
See code below.
Expected behavior
Rule violation should be reported.
Actual behavior
Rule violation is not reported when suggested code fix for pattern matching is applied.
Additional context
Violation is properly reported for the following:
var uiShell = GetService(typeof(SVsUIShell)) as IVsUIShell;
if (uiShell == null)
Applying the suggested code fix for pattern matching yields the following, which incorrectly silences the violation:
if (!(GetService(typeof(SVsUIShell)) is IVsUIShell uiShell))
Bug description
VSTHRD010 is not reported when pattern matching.
Repro steps
See code below.
Expected behavior
Rule violation should be reported.
Actual behavior
Rule violation is not reported when suggested code fix for pattern matching is applied.
Additional context
Violation is properly reported for the following:
Applying the suggested code fix for pattern matching yields the following, which incorrectly silences the violation: