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

Remove Named Requirement for INavigationService #1464

Closed
dansiegel opened this issue Jun 11, 2018 · 1 comment · Fixed by #1465
Closed

Remove Named Requirement for INavigationService #1464

dansiegel opened this issue Jun 11, 2018 · 1 comment · Fixed by #1465

Comments

@dansiegel
Copy link
Member

Description

Requiring INavigationService to be named navigationService comes from a hard Unity requirement in Unity 4. This can now be updated for both Unity and Autofac to allow Type based dependency overrides. DryIoc has already been updated to inject based on type.

Expected Behavior

ViewModels should get the created instance of INavigationService regardless of what the parameter name is.

public class ViewModelA
{
    public ViewModelA(INavigationService navService)
    {
    }
}

public class ViewModelB
{
    public ViewModelB(INavigationService navigationService)
    {
    }
}

Actual Behavior

Currently INavigationService must have a parameter name of navigationService as in ViewModelB below

public class ViewModelB
{
    public ViewModelB(INavigationService navigationService)
    {
    }
}
@lock
Copy link

lock bot commented Jan 29, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant