• J
    Diagnostics API changes for registering compilation actions, code block actions, and end actions · bbb448bb
    John Hamby 提交于
    This change set introduces the notions of registering compilation actions and code block actions into the diagnostics API. Compilation actions differ from compilation end actions in that they do not have access to per-compilation analyzer state and do not introduce action execution ordering constraints. Code block actions differ from code block end actions in that they do not have access to per-block analyzer state and do not introduce action execution ordering constraints.
    
    This change set also removes RegisterXEndAction methods on contexts other than the corresponding StartXAnalysisContext types. This change is intended to guide analyzer authors towards introducing analyzer state with appropriate lifetime.
    
    Some internal mechanism for the removed registration methods remains. This keeps the mechanism fully general and imposes a very marginal execution cost.
    
    The specific API changes:
     -- Removal of AnalysisContext.RegisterCompilationEndAction. CompilationStartAnalysisContext.RegisterCompilationEndAction remains.
     -- Removal of AnalysisContext.RegisterCodeBlockEndAction and CompilationStartAnalysisContext.RegisterCodeBlockEndAction. CodeBlockStartAnalysisContext.RegisterCodeBlockEndAction remains.
     -- Introduction of AnalysisContext.RegisterCompilationAction.
     -- Introduction of AnalysisContext.RegisterCodeBlockAction and CompilationStartAnalysisContext.RegisterCodeBlockAction.
     -- Renaming of CompilationEndAnalysisContext to CompilationAnalysisContext.
     -- Renaming of CodeBlockEndAnalysisContext to CodeBlockAnalysisContext.
    bbb448bb
DiagnosticLogAggregator.cs 3.8 KB