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

DI doesn't work correctly with Reuse #9

Open
PatrykSzwer opened this issue Mar 4, 2019 · 1 comment
Open

DI doesn't work correctly with Reuse #9

PatrykSzwer opened this issue Mar 4, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@PatrykSzwer
Copy link

I have view-model that is called both through direct call to its handler, but it's also part of other view-model as Reusein Json:

  "Editor": {
    "$": {
      "Reuse": "BlendingEditor.Composition.ViewModels.CompositionEditorPopup"
    }

This view-model has service included trough Dependency Injection:

 		private IFileSystemService fileSystemService;
        public CompositionEditorPopup(ICurrentUserProvider<User> currentUserProvider, IFileSystemService fileSystemService)
        {
            this.fileSystemService = fileSystemService;
        }

And when one of this view-model handlers is called trough this other view-model with Reuse, fileSystemService is null. I'm not sure if I'm missing something or/and it should be like that, or It's a bug.

@PatrykSzwer PatrykSzwer added the bug Something isn't working label Mar 4, 2019
@miyconst
Copy link

Unfortunately, this is expected behavior right now, to get it fixed, Starcounter.Startup would have to be integrated into XSON.

cc @erikvk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants