コード例 #1
0
 public void TooManyParameters()
 {
     var diagnostic = new TooManyParameters {Maximum = 3};
     Verifier.VerifyAnalyzer(@"TestCases\TooManyParameters.cs", diagnostic);
 }
コード例 #2
0
 private void AddAnalyzerTooManyParameters(ImmutableArray<DiagnosticAnalyzer>.Builder builder)
 {
     var analyzer = new TooManyParameters();
     if (!AnalyzerIds.Contains(analyzer.SupportedDiagnostics.Single().Id))
     {
         return;
     }
     analyzer.Maximum = int.Parse(
         Parameters[analyzer.SupportedDiagnostics.Single().Id].Single()["max"],
         NumberStyles.None, CultureInfo.InvariantCulture);
     builder.Add(analyzer);
 }