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
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);
Shared creation policy is not applied when ZyanComponent is imported on the server-side.
Two instances are created instead of one.
How to reproduce:
[ZyanComponent(typeof (ITelphinService))]
[PartCreationPolicy(CreationPolicy.Shared)]
public partial class TelphinService : ITelphinService
{
public event EventHandler Answered;
}
TelphineService.Answered += new EventHandler(TelphinService_Answered);
[Import]
private ITelphinService TelphinService { get; set; }
TelphinService.OnAnswered(new EventArgs());
The text was updated successfully, but these errors were encountered: