-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hotfix/5.12.18 #1841
Hotfix/5.12.18 #1841
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some feedback, may be it will be helpful
/// </summary> | ||
/// <param name="data">The payload data.</param> | ||
/// <param name="tag">The optional Catel mediator tag to be used.</param> | ||
public static void SendWith(TData data, object tag = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good to have in the future SendWith(TData data, Action<TMessage>)
Sometimes it's need to initialize some properties on the Message but it's required to introduce aggreagte class to pass it on TData place.
I'm usually using the non-static way to send message and adding depedency on mediator instead of using such helpers because of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have introduced:
public static void SendWith(TData data, Action<TMessage> initializer, object tag = null)
{
var message = With(data);
if (initializer is not null)
{
initializer(message);
}
Send(message, tag);
}
Hopefully that is what you meant. If not, please let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much!
No description provided.