Repository navigation
Add configuration-based mapping generator with 4 registration approaches - #11
Merged
Merged
Conversation
- Add MappingConfigurationGenerator with mapper class pattern, assembly-level MapTypes, class-level MapTypes, and inline MappingBuilder registration - Add new attributes: MappingConfiguration, MapConfigProperty, MapConfigIgnore, MapConfigOptions, MapTypes, MappingBuilder - Add enum auto-detection for configuration-based mappings - Add diagnostics ATCMCF001-014 and ATCMAP005-006 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add MappingOnlyConfiguration sample (CRM external type mapping) - Add MappingCombinedConfiguration sample (mixed attribute + config mapping) - Update solution file and project references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove all 18 docs/*.md files (migrated to GitHub wiki) - Update README.md to reference wiki instead of docs/ - Update CLAUDE.md with MappingConfiguration documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ataName - Replace ToDisplayString() attribute comparisons with MetadataName checks across all 6 generators - Migrate ObjectMapping, EnumMapping, DependencyRegistration, and OptionsBinding to ForAttributeWithMetadataName - Pre-compile regex patterns in FilterRules and use HashSet for interface exclusion - Fix string allocation in PropertyNameUtility using range operator Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lpers - Extract 9 duplicate methods from ObjectMapping/MappingConfiguration into MappingTypeAnalyzer - Add TypeNameSanitizer for safe generic type name handling in generated identifiers - Add new diagnostic IDs ATCENUM006 and ATCMAP011 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Atc-specific attribute tests for AnnotationConstantsGenerator - Add extended EnumMapping tests (flags, special cases, bidirectional) - Add MappingConfiguration error and property mapping tests - Add ObjectMapping error handling and UpdateTarget tests - Add DependencyRegistration runtime filter and decorator tests - Add integration tests that build sample projects Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
MappingConfigurationGeneratorthat enables mapping 3rd-party types without requiring attributes on source types.Introduces four complementary mapping approaches: mapper class pattern, assembly-level
[MapTypes], class-level[MapTypes], andinline
MappingBuilder.Configure(). Also includes performance optimizations across all generators, shared helper extraction,comprehensive test coverage, and documentation migration to GitHub wiki.
Changes
✨ Features
MappingConfigurationGeneratorwith mapper class pattern ([MappingConfiguration]+ partial methods) for full-control3rd-party type mapping
[MapTypes]shorthand for simple mapping declarationsMappingBuilder.Configure()/AddMappings()registration with compile-time lambda parsingMappingConfigurationAttribute,MapConfigPropertyAttribute,MapConfigIgnoreAttribute,MapConfigOptionsAttribute,MapTypesAttribute,MappingBuilder⚡ Performance
ForAttributeWithMetadataNamefor optimalincremental caching
ToDisplayString()attribute comparisons withMetadataNamechecks across all 6 generatorsFilterRulesand useHashSetfor interface exclusionPropertyNameUtilityusing range operatorHashSet<string>deduplication for partial class handling across all generators♻️ Refactoring
MappingTypeAnalyzer(9 duplicate methods consolidated from ObjectMapping/MappingConfiguration)TypeNameSanitizerfor safe generic type name handling in generated identifiersEnumMappingHelperfor enum mapping code generation pipeline✅ Tests
case, assembly, class-level, inline, error tests)
📝 Documentation
🔧 Configuration
.editorconfigfor sample projectsDirectory.Build.propsand project references for new sample projects