Exemplo n.º 1
0
 public static void Analyze(SyntaxNodeAnalysisContext context, ConditionalExpressionSyntax conditionalExpression)
 {
     if (CanRefactor(conditionalExpression, context.SemanticModel, context.CancellationToken) &&
         !conditionalExpression.SpanContainsDirectives())
     {
         context.ReportDiagnostic(
             DiagnosticDescriptors.SimplifyConditionalExpression,
             conditionalExpression.GetLocation());
     }
 }