I have this code, which works well,
void Message(IMessage m)
{
m.MyProperty = "Some Value";
}
await context.Publish<IMessage>(Message).ConfigureAwait(false);
I have a contract (IMessage) and create a constructor for an action that is to be published.
But I want to be able to create the action from a string. I.e. from this starting point,
var messageType = "IMessage";
I want to be able to send the same message as above.
This may not be the best way to do what I want to do, but it would be really interesting if it can be done.
Aucun commentaire:
Enregistrer un commentaire