Repository navigation
Replies: 1 comment 1 reply
|
@bwjunkie the MVVM Toolkit is a spiritual successor not a fork, it didn't start from the codebase of MVVMLight. While it was intended to be easy to migrate from MVVMLight, there was not a goal to maintain complete compatibility with the API/behavior of MVVMLight. I don't think there was ever an intent to support straight base types for messages. The main issue is Generally, you'd create a record (class) to encapsulate your message data (which also makes it more extensible for adding other values to your message later on): public record MyGuidMessage(Guid Id);
Messenger.Default.Send<MyGuidMessage>(new(_guid)); |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
mvvmLight allowed
Messenger.Register<Guid>(...CommunityToolkit error:
Type argument 'Guid' does not satisfy the Class constraint for type parameter TMessage
Question: is this a breaking change from mvvmlight (which must have a different implementation of TMessage?)
note: the migration documentation : https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/migratingfrommvvmlight#migrating-observableobject
thank you
Josh
All reactions