Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Separate namespaces to avoid ambiguous references

Aperta
#705 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp

Direzione di ricerca

Inizia individuando le estensioni async che contengono AfterMappingAsync e le estensioni di base di Mapster con cui attualmente condividono un namespace e una classe. Esamina i riferimenti e i mappings generati tramite reflection per valutare la modifica del namespace; il lavoro è completato quando le API async e di base possono essere utilizzate senza extern alias o la qualificazione global::Mapster.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

improvement

We're using Mapster quite to the maximum extent that is somehow possible. With reflection we dynamically generate base mappings for polymorphic DTOs. Now the issue is, that we need to generate a base implementation that uses AfterMappingAsync.

Since the extensions for that are in the very same namespace and class than the base extensions of Mapster, we have a collision and need to work with extern alias which makes using it a pain. Now we need to also use global::Mapster everywhere else.

Wouldn't it be easier to just put them into a Mapster.Async namespace? I see no benefit for identical namespaces and types other than confusion and unncessary pain to work with it.

Obviously working with Reflection is an edge case here, but still. I feel like this is not very good design. I would avoid using the same namespaces and classes at all costs as it also makes navigation in the source code a lot easier and more transparent.

Lingua principale
C#
Stelle
5.2k
Fork
411
Merge medio
3g 4h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MapsterMapper/Mapster

Tutte le issue di MapsterMapper/Mapster

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.