Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared creation policy is not applied #11

Open
sobolev88 opened this issue Mar 6, 2017 · 0 comments
Open

Shared creation policy is not applied #11

sobolev88 opened this issue Mar 6, 2017 · 0 comments
Assignees
Labels

Comments

@sobolev88
Copy link
Collaborator

Shared creation policy is not applied when ZyanComponent is imported on the server-side.
Two instances are created instead of one.

How to reproduce:

  1. 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);
}

}

  1. Subscribe to event on client-side

TelphineService.Answered += new EventHandler(TelphinService_Answered);

  1. Raise event on server-side:
    [Import]
    private ITelphinService TelphinService { get; set; }

TelphinService.OnAnswered(new EventArgs());

  1. Event is not raised on client-side
@yallie yallie self-assigned this Mar 6, 2017
@yallie yallie added this to the 2.9 milestone Mar 6, 2017
@yallie yallie added the bug label May 10, 2017
@yallie yallie modified the milestones: 2.10, 2.9 Jun 15, 2017
@yallie yallie modified the milestones: 2.10, 2.11 Apr 30, 2018
@yallie yallie modified the milestones: 2.11, 2.12 Nov 4, 2018
@yallie yallie modified the milestones: 2.12, 2.13 Nov 27, 2019
@yallie yallie removed this from the 2.13 milestone Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants