/// <summary> /// Register an action to be executed at completion of semantic analysis of a <see cref="SyntaxNode"/> with an /// appropriate kind. A syntax node action can report diagnostics about a <see cref="SyntaxNode"/>, and can also /// collect state information to be used by other syntax node actions or code block end actions. /// </summary> /// <param name="context">The analysis context.</param> /// <param name="action">Action to be executed at completion of semantic analysis of a /// <see cref="SyntaxNode"/>.</param> /// <param name="syntaxKind">The kind of syntax that should be analyzed.</param> /// <typeparam name="TLanguageKindEnum">Enum type giving the syntax node kinds of the source language for which /// the action applies.</typeparam> public static void RegisterSyntaxNodeActionWithExclusionsVerification <TLanguageKindEnum>(this CompilationStartAnalysisContext context, Action <SyntaxNodeAnalysisContext, StyleCopSettings> action, TLanguageKindEnum syntaxKind) where TLanguageKindEnum : struct { context.RegisterSyntaxNodeActionWithExclusionsVerification(action, LanguageKindArrays <TLanguageKindEnum> .GetOrCreateArray(syntaxKind)); }
/// <summary> /// Register an action to be executed at completion of semantic analysis of a <see cref="SyntaxNode"/> with an /// appropriate kind. A syntax node action can report diagnostics about a <see cref="SyntaxNode"/>, and can also /// collect state information to be used by other syntax node actions or code block end actions. /// </summary> /// <remarks>This method honors exclusions.</remarks> /// <param name="context">Action will be executed only if the kind of a <see cref="SyntaxNode"/> matches /// <paramref name="syntaxKind"/>.</param> /// <param name="action">Action to be executed at completion of semantic analysis of a /// <see cref="SyntaxNode"/>.</param> /// <param name="syntaxKind">The kind of syntax that should be analyzed.</param> /// <typeparam name="TLanguageKindEnum">Enum type giving the syntax node kinds of the source language for which /// the action applies.</typeparam> public static void RegisterSyntaxNodeActionHonorExclusions <TLanguageKindEnum>(this CompilationStartAnalysisContext context, Action <SyntaxNodeAnalysisContext> action, TLanguageKindEnum syntaxKind) where TLanguageKindEnum : struct { context.RegisterSyntaxNodeActionHonorExclusions(action, LanguageKindArrays <TLanguageKindEnum> .GetOrCreateArray(syntaxKind)); }