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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all.
Let's assume that we have 2 constructors
public SomeClassA(IEventAggregator eventAggregator)
{
}
and
public SomeClassB(SomePubSubEvent event)
{
_event = event;
}
How will be created event for the second constructor?
Will I have the same instance of event if the second constructor will be changed to
public SomeClassB(IEventAggregator eventAggregator)
{
_event = eventAggregator.GetEvent< SomePubSubEvent >();
}
?
Finally - all references from different modules to event of certain type should be references to the same instance of event?
Also - If I have different modules, which uses separate MyEvents.dll, but in first case I publish event A from MyEvents.dll version 1.0.0,
but in another module I do subscription to event A from MyEvents.dll 1.1.0 - should the subscription work?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions