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
{{ message }}
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.
I have a feature idea that I want to run by the community.
I have a situation where I'm in my application and I'm opening numerous windows (in the View Model (VM) using messages) and I need to listen to messages returned from the VM of the window that I'm opening. Here is a bit of the code that I'm using:
A command on the main form of my application will call this method on the VM which kicks off the workflow. Two form gather information by allow a user to search through some database/list and then finally hides the form that started the process and then calls the final form that will capture all the user's data.
I think this demonstrates where an IDisposible return would allow you to easily unregister instead of putting your UnRegister calls in your finally. It would still allow for strict adherence to using the Mediator pattern and allow for unit testing to still allow be modular and easy to implement the message handlers.
Maybe the method could even be called RegisterScope to denote that it's only valid for a particular scope in the code.
Any thoughts on this?
Thanks
Scott
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a feature idea that I want to run by the community.
I have a situation where I'm in my application and I'm opening numerous windows (in the View Model (VM) using messages) and I need to listen to messages returned from the VM of the window that I'm opening. Here is a bit of the code that I'm using:
A command on the main form of my application will call this method on the VM which kicks off the workflow. Two form gather information by allow a user to search through some database/list and then finally hides the form that started the process and then calls the final form that will capture all the user's data.
I think this demonstrates where an
IDisposible
return would allow you to easily unregister instead of putting yourUnRegister
calls in your finally. It would still allow for strict adherence to using the Mediator pattern and allow for unit testing to still allow be modular and easy to implement the message handlers.Maybe the method could even be called
RegisterScope
to denote that it's only valid for a particular scope in the code.Any thoughts on this?
Thanks
Scott
The text was updated successfully, but these errors were encountered: