CodeTiger.CodeAnalysis/Analyzers/Naming/SymbolNamingAnalyzer.cs
/// <summary>
/// Registers actions in an analysis context.
/// </summary>
/// <param name="context">The context to register actions in.</param>
/// <remarks>This method should only be called once, at the start of a session.</remarks>
Registers actions in an analysis context.
Registers actions in an analysis context .
public override void Initialize(AnalysisContext context)
        {
            Guard.ArgumentIsNotNull(nameof(context), context);
            context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
            context.EnableConcurrentExecution();
            context.RegisterSyntaxNodeAction(AnalyzeTypeName, SyntaxKind.ClassDeclaration,
                SyntaxKind.StructDeclaration, SyntaxKind.EnumDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzeFieldName, SyntaxKind.FieldDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzeFieldNameForHungarianNotation, SyntaxKind.FieldDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzeEventFieldName, SyntaxKind.EventFieldDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzeDelegateName, SyntaxKind.DelegateDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzePropertyName, SyntaxKind.PropertyDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzeMethodName, SyntaxKind.MethodDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzeEnumerationMemberName, SyntaxKind.EnumMemberDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzeLocalVariableNames, SyntaxKind.LocalDeclarationStatement);
            context.RegisterSyntaxNodeAction(AnalyzeInterfaceName, SyntaxKind.InterfaceDeclaration);
            context.RegisterSyntaxNodeAction(AnalyzeParameterName, SyntaxKind.Parameter);
            context.RegisterSyntaxNodeAction(AnalyzeGenericTypeParameterName, SyntaxKind.TypeParameter);
            context.RegisterSyntaxNodeAction(AnalyzeClassNamePrefixesAndSuffixes, SyntaxKind.ClassDeclaration);
        }
public override void Initialize ( AnalysisContext context ) { Guard . ArgumentIsNotNull ( nameof ( context ) , context ) ; context . ConfigureGeneratedCodeAnalysis ( GeneratedCodeAnalysisFlags . None ) ; context . EnableConcurrentExecution ( ) ; context . RegisterSyntaxNodeAction ( AnalyzeTypeName , SyntaxKind . ClassDeclaration , SyntaxKind . StructDeclaration , SyntaxKind . EnumDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzeFieldName , SyntaxKind . FieldDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzeFieldNameForHungarianNotation , SyntaxKind . FieldDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzeEventFieldName , SyntaxKind . EventFieldDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzeDelegateName , SyntaxKind . DelegateDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzePropertyName , SyntaxKind . PropertyDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzeMethodName , SyntaxKind . MethodDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzeEnumerationMemberName , SyntaxKind . EnumMemberDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzeLocalVariableNames , SyntaxKind . LocalDeclarationStatement ) ; context . RegisterSyntaxNodeAction ( AnalyzeInterfaceName , SyntaxKind . InterfaceDeclaration ) ; context . RegisterSyntaxNodeAction ( AnalyzeParameterName , SyntaxKind . Parameter ) ; context . RegisterSyntaxNodeAction ( AnalyzeGenericTypeParameterName , SyntaxKind . TypeParameter ) ; context . RegisterSyntaxNodeAction ( AnalyzeClassNamePrefixesAndSuffixes , SyntaxKind . ClassDeclaration ) ; }
Registers actions in an analysis context.
Registers actions in an analysis context .
context
AnalysisContext
The context to register actions in.
The context to register actions in .
remarks
This method should only be called once, at the start of a session.
This method should only be called once at the start of a session .