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
IsActive just calls either RegisterAll or UnregisterAll, these are not AOT safe, so that's the core issue.
Sergio had mentioned these should probably just end up being another source generator instead, so you don't have to manually register each interface either.
Could be a good, isolated generator issue for someone to pick up?
publicpartialclassMyViewModel:ObservableRecipient,// or ObservableObject, etc...IRecipient<MyMessage1>,IRecipient<MyMessage2>{}
@Sergio0694 were you thinking it'd work like the DependencyInjection API and would there just be a partial RegisterMessages method or something added to OO?
publicObservableObject{// New generated helper injection pointspartialRegisterMesssages();partialUnregisterMesssages();}
Maybe these would be on OR, but in OO, the Messenger.RegisterAll method could then just go call RegisterMessages internally or something, right?
Describe the bug
i always use ObservableRecipient and its IsActive property, now it seems that does not support AOT/Trim.
Solution:
i created a new property for this:
[ObservableProperty]
public bool isProcessActive;
Regression
CommunityToolkit.Mvvm 8.3.2
Steps to reproduce
Expected behavior
Support AOT/Trim
Screenshots
No response
IDE and version
VS 2022
IDE version
No response
Nuget packages
Nuget package version(s)
8.3.2
Additional context
No response
Help us help you
No, just wanted to report this
The text was updated successfully, but these errors were encountered: