How i-rzr-i/codesource works
CodeSource is a .NET library for recording code-attribution metadata in attributes, reflecting over compiled assemblies to collect it, and exporting the resulting report. The principal workflow is annotate code, scan an assembly (optionally including its direct references), then select an export format. Scanning builds hierarchical type/member history and can report stage-specific errors; exporters produce six documented formats. Relationships for unsampled implementation details are limited to dependencies visible in the source index or the README.
Main entry points: CodeSourceHelper.cs Reflection scan · Export Format exporters · CodeSourceScanner.cs Scanner service · ExporterRegistry.cs Exporter registry
Components 18
Attribution metadata
- CodeSource attribute
src/CodeSource/CodeSourceAttribute.cs - Attribute contract
src/CodeSource/Abstractions/ICodeSourceAttribute.cs
Assembly scanning
- Scanner service
src/CodeSource/Services/CodeSourceScanner.cs - Reflection scan
src/CodeSource/Helpers/CodeSourceHelper.cs - Scan options
src/CodeSource/Models/CodeSourceScanOptions.cs - Scan errors
src/CodeSource/Models/CodeSourceScanError.cs - Scan stages
src/CodeSource/Models/CodeSourceScanStage.cs - Scan result
src/CodeSource/Models/CodeSourceObjectsResult.cs - Code object
src/CodeSource/Models/CodeSourceObject.cs - Attribution history
src/CodeSource/Models/CodeSourceObjectHistory.cs
Report export
- Exporter registry
src/CodeSource/Services/ExporterRegistry.cs - Format constants
src/CodeSource/ExportFormats.cs - Exporter contract
src/CodeSource/Abstractions/ICodeSourceExporter.cs - Format exporters
src/CodeSource/Services/Export - Export errors
src/CodeSource/Exceptions/CodeSourceExporterException.cs
Other components
- Library user
- Annotated assemblies
- Report output
Connections 22
- Library user → CodeSource attribute: annotates code
README.md - CodeSource attribute → Attribute contract: implements
src/CodeSource/CodeSourceAttribute.cs - Library user → Scanner service: requests scan
README.md - Annotated assemblies → Scanner service: provides assembly
README.md - Scanner service → Reflection scan: delegates scan
src/CodeSource/Services/CodeSourceScanner.cs - Scanner service → Scan options: uses options
src/CodeSource/Services/CodeSourceScanner.cs - Reflection scan → CodeSource attribute: reads annotations
src/CodeSource/Helpers/CodeSourceHelper.cs - Reflection scan → Scan options: uses options
src/CodeSource/Helpers/CodeSourceHelper.cs - Reflection scan → Scan errors: reports failures
src/CodeSource/Helpers/CodeSourceHelper.cs - Reflection scan → Scan stages: records stage
src/CodeSource/Helpers/CodeSourceHelper.cs - Reflection scan → Scan result: builds results
src/CodeSource/Helpers/CodeSourceHelper.cs - Scan result → Code object: contains objects
src/CodeSource/Models/CodeSourceObjectsResult.cs - Code object → Attribution history: holds history
src/CodeSource/Models/CodeSourceObject.cs - Library user → Exporter registry: selects format
README.md - Scanner service → Exporter registry: supplies results
README.md - Exporter registry → Format constants: selects format
src/CodeSource/ExportFormats.cs - Exporter registry → Exporter contract: dispatches through
src/CodeSource/Services/ExporterRegistry.cs - Exporter registry → Format exporters: dispatches to
src/CodeSource/Services/ExporterRegistry.cs - Format exporters → Scan result: serializes results
src/CodeSource/Services/Export/JsonExporter.cs - Format exporters → Attribution history: serializes history
src/CodeSource/Services/Export/JsonExporter.cs - Format exporters → Export errors: wraps failures
src/CodeSource/Services/Export/JsonExporter.cs - Format exporters → Report output: writes report
README.md