-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
Shared creation policy is not applied when ZyanComponent is imported on the server-side.
Two instances are created instead of one.
How to reproduce:
- Creating shared service
[ZyanComponent(typeof (ITelphinService))]
[PartCreationPolicy(CreationPolicy.Shared)]
public partial class TelphinService : ITelphinService
{
public event EventHandler Answered;
public void OnAnswered(EventArgs args)
{
Answered.SafeInvoke(null, args);
}
}
- Subscribe to event on client-side
TelphineService.Answered += new EventHandler(TelphinService_Answered);
- Raise event on server-side:
[Import]
private ITelphinService TelphinService { get; set; }
TelphinService.OnAnswered(new EventArgs());
- Event is not raised on client-side
yallie