private static void AnalyzeSimpleMemberAccessExpression(SyntaxNodeAnalysisContext context)
        {
            if (!ConvertToAnonymousFunction(context))
            {
                return;
            }

            var simpleMemberAccess = (MemberAccessExpressionSyntax)context.Node;

            ConvertMethodGroupToAnonymousFunctionAnalysis.IsFixable(simpleMemberAccess, context.SemanticModel, context.CancellationToken);
        }
        private static void AnalyzeIdentifierName(SyntaxNodeAnalysisContext context)
        {
            if (!ConvertToAnonymousFunction(context))
            {
                return;
            }

            var identifierName = (IdentifierNameSyntax)context.Node;

            ConvertMethodGroupToAnonymousFunctionAnalysis.IsFixable(identifierName, context.SemanticModel, context.CancellationToken);
        }
Пример #3
0
        private static void AnalyzeSimpleMemberAccessExpression(SyntaxNodeAnalysisContext context)
        {
            if (!DiagnosticDescriptors.ConvertAnonymousFunctionToMethodGroupOrViceVersa.IsEffective(context))
                return;

            if (!AnalyzerOptions.ConvertMethodGroupToAnonymousFunction.IsEnabled(context))
                return;

            var simpleMemberAccess = (MemberAccessExpressionSyntax)context.Node;

            ConvertMethodGroupToAnonymousFunctionAnalysis.IsFixable(simpleMemberAccess, context.SemanticModel, context.CancellationToken);
        }
Пример #4
0
        private static void AnalyzeIdentifierName(SyntaxNodeAnalysisContext context)
        {
            if (!DiagnosticDescriptors.ConvertAnonymousFunctionToMethodGroupOrViceVersa.IsEffective(context))
                return;

            if (!AnalyzerOptions.ConvertMethodGroupToAnonymousFunction.IsEnabled(context))
                return;

            var identifierName = (IdentifierNameSyntax)context.Node;

            ConvertMethodGroupToAnonymousFunctionAnalysis.IsFixable(identifierName, context.SemanticModel, context.CancellationToken);
        }