How andrewlock/stronglytypedid works
Main Components
a) Core Components:
• Source Generator Engine
• Template System
• Diagnostic System
• Attribute System
b) Integration Components:
• Build System Integration
• IDE Integration (CodeFix Provider)
• External Framework Support (EF Core, Dapper, etc.)
┌─ Development Time ──────────────────────────────────────────┐
• ┌─ IDE Integration ─┐ ┌─ Source Generator Engine ─┐ │
• CodeFix │◄──►│ - Parser │ │
• Provider │ │ - Generator │ │
• Diagnostics │ │ - Type Generation │ │
• ┘ └───────────────┬───────────┘ │
• ▼ │
• ┌─ Template System ──────────┐ │
• Built-in Templates │ │
• Custom Templates │ │
• Template Processing │ │
• ┬───────────┘ │
• ┼───────────────────┘
┌─ Runtime ────────────────────────────┬─┼───────────────────┐
• ┌─ Generated Code ─────────────┐ │ │ │
• ◄───┘ │ │
• Strongly Typed IDs │ │ │
• Type Converters │ │ │
• Serialization Support │ │ │
• ┬───────────────┘ │ │
• ┌─ Framework Integration ─────────────┐│ │
• EF Core Support ││ │
• Dapper Integration ◄┘ │
• JSON Serialization │ │
• ┘ │
• ┘
Key Relationships to Highlight
• Source Generator Engine receiving input from IDE Integration
• Template System feeding into Generated Code
• Generated Code connecting to Framework Integration
• Bi-directional communication between IDE Integration and Source Generator
Important Elements
• Clear distinction between development-time and runtime components
• Template processing flow
• Integration points with external frameworks
• Diagnostic feedback loop
• Build process integration
Implementation Details to Note
• Relationship between attributes and generated code
• Where template customization occurs
• Diagnostic system's integration points
• How the build process interacts with the system
Remember to include notes about:
• The .NET 7+ requirement
• The source generator's incremental nature
• The template-based architecture
• The extension points for custom implementations
This will provide a comprehensive view of the system while maintaining clarity about its core purpose of generating strongly-typed IDs.