public void TooManyLabelsInSwitch()
 {
     var diagnostic = new TooManyLabelsInSwitch {Maximum = 2};
     Verifier.Verify(@"TestCases\TooManyLabelsInSwitch.cs", diagnostic);
 }
Esempio n. 2
0
 private void AddAnalyzerTooManyLabelsInSwitch(ImmutableArray<DiagnosticAnalyzer>.Builder builder)
 {
     var analyzer = new TooManyLabelsInSwitch();
     if (!AnalyzerIds.Contains(analyzer.SupportedDiagnostics.Single().Id))
     {
         return;
     }
     analyzer.Maximum = int.Parse(
         Parameters[analyzer.SupportedDiagnostics.Single().Id].Single()["maximum"],
         NumberStyles.None, CultureInfo.InvariantCulture);
     builder.Add(analyzer);
 }