You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code generators and analyzers currently rely on string-based type name matching, which breaks when types are renamed during refactoring
Symbol-based comparison using SymbolEqualityComparer is refactoring-safe and more reliable for Roslyn-based code analysis
Need to resolve well-known type symbols once per compilation for efficiency and cache them for reuse across analysis operations
Fallback to string comparison is necessary when symbol resolution fails (e.g., types from uncompiled assemblies)
Deliverables
Symbol Caching: Implement KnownTypeSymbols class to resolve and cache well-known type symbols once per compilation
Analyzer Refactoring: Update EventUsageAnalyzer to use symbol-based comparison for all type checks with string fallback
Generator Updates: Modify TypeMappingsGenerator and ConsumeContextConverterGenerator to resolve symbols and use symbol comparison for attribute and interface detection
Documentation: Add XML comments explaining the symbol comparison strategy and fallback behavior
Description
SymbolEqualityCompareris refactoring-safe and more reliable for Roslyn-based code analysisDeliverables
KnownTypeSymbolsclass to resolve and cache well-known type symbols once per compilationEventUsageAnalyzerto use symbol-based comparison for all type checks with string fallbackTypeMappingsGeneratorandConsumeContextConverterGeneratorto resolve symbols and use symbol comparison for attribute and interface detection