You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One very exciting possibility of a source-generated mediator implementation is to ease the pain of tracking down what methods are called by the mediator, at design time. At runtime, step-through debugging makes this a breeze, but at design-time you must parse the generated code and follow a few steps in order to find the handler code, which is not something I want to force on my fellow developers.
Does the source generator know enough context to include an xml comment linking to the handler method? An example of this is the MVVM Community Toolkit source generators for RelayCommands, which generate the following
/// <summary>Gets an <see cref="global::CommunityToolkit.Mvvm.Input.IAsyncRelayCommand"/> instance wrapping <see cref="Initialize"/>.</summary>publicglobal::CommunityToolkit.Mvvm.Input.IAsyncRelayCommandInitializeCommand=> initializeCommand ??=newglobal::CommunityToolkit.Mvvm.Input.AsyncRelayCommand(newglobal::System.Func<global::System.Threading.Tasks.Task>(Initialize));Thispattern has helped immensely to decouple our code,but it would be nice to have our cake and eat it to - the analyzers for unhandled messages and command are another huge usability bump!
The text was updated successfully, but these errors were encountered:
One very exciting possibility of a source-generated mediator implementation is to ease the pain of tracking down what methods are called by the mediator, at design time. At runtime, step-through debugging makes this a breeze, but at design-time you must parse the generated code and follow a few steps in order to find the handler code, which is not something I want to force on my fellow developers.
Does the source generator know enough context to include an xml comment linking to the handler method? An example of this is the MVVM Community Toolkit source generators for RelayCommands, which generate the following
The text was updated successfully, but these errors were encountered: