[MN-06] Mapster: Global Configuration Check #5

Open
opened 2026-05-05 12:15:03 +00:00 by mjasin · 0 comments
Owner

Full Detail: MappingConfig.cs (line 12) accesses TypeAdapterConfig.GlobalSettings. While currently safe, if the project scales and more assemblies add mappings via .Scan(), we risk multiple redundant scans which degrade startup performance.

Action:

  • Ensure that any .Scan() or global configuration is wrapped in a check to prevent multiple executions.
  • Consider moving away from GlobalSettings in favor of a specific TypeAdapterConfig instance passed via DI.
**Full Detail:** `MappingConfig.cs` (line 12) accesses `TypeAdapterConfig.GlobalSettings`. While currently safe, if the project scales and more assemblies add mappings via `.Scan()`, we risk multiple redundant scans which degrade startup performance. **Action:** - Ensure that any `.Scan()` or global configuration is wrapped in a check to prevent multiple executions. - Consider moving away from `GlobalSettings` in favor of a specific `TypeAdapterConfig` instance passed via DI.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mjasin/Nexus.Reader#5