I got a class that currently needs to be registered like this (to work reflection-free)
ViewLocator = new StrongViewLocator()
.Register<MainWindowViewModel>(new ViewDefinition(typeof(MainWindow), () => new MainWindow()))
.Register<AddTextDialogViewModel>(new ViewDefinition(typeof(AddTextDialog), () => new AddTextDialog()));
I want to get the equivalent of the above code generated using this simpler syntax.
ViewLocator = new StrongViewLocator()
.Register<MainWindowViewModel, MainWindow>()
.Register<AddTextDialogViewModel, AddTextDialog>();
How can I achieve this with Source Generator?