System.Resources.Analyzers.CSharpMarkAssembliesWithNeutralResourcesLanguageAnalyzer.RegisterAttributeAnalyzer C# (CSharp) Méthode

RegisterAttributeAnalyzer() protected méthode

protected RegisterAttributeAnalyzer ( CompilationStartAnalysisContext context, Action onResourceFound ) : void
context CompilationStartAnalysisContext
onResourceFound Action
Résultat void
        protected override void RegisterAttributeAnalyzer(CompilationStartAnalysisContext context, Action onResourceFound)
        {
            context.RegisterSyntaxNodeAction(nc =>
            {
                if (!CheckAttribute(nc.Node))
                {
                    return;
                }

                if (!CheckResxGeneratedFile(nc.SemanticModel, nc.Node, ((AttributeSyntax)nc.Node).ArgumentList.Arguments[0].Expression, nc.CancellationToken))
                {
                    return;
                }

                onResourceFound();
            }, SyntaxKind.Attribute);
        }
CSharpMarkAssembliesWithNeutralResourcesLanguageAnalyzer