Caliburn.Micro
Caliburn.Micro copied to clipboard
Added async eventhandler to IActivate
This fixes #762, and makes it so that ConductWith
has the same behavior for Activate
and Deactivate
.
This will be a breaking change so how you manage this in terms of sem ver will be interesting.
@nigel-sampson you are right this is a breaking change. Do you think we should have both Activated and ActivatedAsync events? We could mark Activated as obsolete and remove it in a future release.
event AsyncEventHandler<ActivationEventArgs> ActivatedAsync;
[Obsolete]
event EventHandler<ActivationEventArgs> Activated;
It's a tough one, because that style approach means you're left with ActivatedAsync
as the name which creates conflict with the other event names which would lead to another round of deprecation / rename.
Another possibility is to hold off on fixing this till the next major version.
@nigel-sampson I thought about this being breaking, however I also see it as something I should have taken into account when making the change for IDeactivate
. Bumping the major version just for this feature would not be right so I guess this will have to wait till we have enough changes to justify 5.0
.
Yes @vb2ae, this needs to go in V5 since we where holding back on this change because it was breaking.