LukeMoody01 / Moody.DialogService

Moody DialogService is a service designed to handle dialogs in an MVVM pattern for WPF.
MIT License
7 stars 0 forks source link

Consider using source generator #2

Open glennawatson opened 2 years ago

glennawatson commented 2 years ago

At the moment parts of your code base are using reflection to register your dialogs. eg https://github.com/LukeMoody01/Moody.DialogService/blob/afa36861ede71282d9a6a2225c4ce30cbdc2fd2c/Moody.DialogService/Services/DialogService.cs#L81

Consider using source generator similar to https://github.com/reactivemarbles/Splat.DI.SourceGenerator

Main advantage is performance.

Also the reflection code is a bit manual which can cause a bit of breakage easily

glennawatson commented 2 years ago

So with source generators btw, the actual code you produce isn't all that different, just you know the types at compile time and generate the code then.