{"action":"created","issue":{"url":"https://api.github.com/repos/PrismLibrary/Prism/issues/1366","repository_url":"https://api.github.com/repos/PrismLibrary/Prism","labels_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/1366/labels{/name}","comments_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/1366/comments","events_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/1366/events","html_url":"https://github.com/PrismLibrary/Prism/issues/1366","id":297537759,"number":1366,"title":"INavigationService can't be injected into contructors outside main application and no method RegisterSingletonForNavigation","user":{"login":"Erave","id":10231516,"avatar_url":"https://avatars3.githubusercontent.com/u/10231516?v=4","gravatar_id":"","url":"https://api.github.com/users/Erave","html_url":"https://github.com/Erave","followers_url":"https://api.github.com/users/Erave/followers","following_url":"https://api.github.com/users/Erave/following{/other_user}","gists_url":"https://api.github.com/users/Erave/gists{/gist_id}","starred_url":"https://api.github.com/users/Erave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Erave/subscriptions","organizations_url":"https://api.github.com/users/Erave/orgs","repos_url":"https://api.github.com/users/Erave/repos","events_url":"https://api.github.com/users/Erave/events{/privacy}","received_events_url":"https://api.github.com/users/Erave/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-15T17:49:20Z","updated_at":"2018-02-15T17:55:56Z","closed_at":"2018-02-15T17:55:56Z","author_association":"NONE","body":"\r\nI have noticed that if you create a view inside Prism MainApp and you want INavigationService as contructor parameter there is no problem. Unity resolve correctly INavigationService instance. But If you do the same into a Module, you can't navigate into you registered View (using registerNavigation) because Unity can't resolve INavigationService !\r\nThis is very strange because my UnityContainer owns this instance.\r\n\r\nHave you an idea for this issue ?\r\n\r\nAnother question, we come from an Prism3 WPF project using MEF. MEF by default uses singleton object and we think it is a good idea to avoid memory leak. \r\nIn Unity, you can use Register or RegisterSingleton ... Good we can choose. But for Navigation there is only Register. \r\nI had a look at Prism Source Code and there is no implementation for **RegisterSingletonForNavigation**. This can be very useful. No ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/PrismLibrary/Prism/issues/comments/366009099","html_url":"https://github.com/PrismLibrary/Prism/issues/1366#issuecomment-366009099","issue_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/1366","id":366009099,"user":{"login":"brianlagunas","id":835562,"avatar_url":"https://avatars0.githubusercontent.com/u/835562?v=4","gravatar_id":"","url":"https://api.github.com/users/brianlagunas","html_url":"https://github.com/brianlagunas","followers_url":"https://api.github.com/users/brianlagunas/followers","following_url":"https://api.github.com/users/brianlagunas/following{/other_user}","gists_url":"https://api.github.com/users/brianlagunas/gists{/gist_id}","starred_url":"https://api.github.com/users/brianlagunas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianlagunas/subscriptions","organizations_url":"https://api.github.com/users/brianlagunas/orgs","repos_url":"https://api.github.com/users/brianlagunas/repos","events_url":"https://api.github.com/users/brianlagunas/events{/privacy}","received_events_url":"https://api.github.com/users/brianlagunas/received_events","type":"User","site_admin":false},"created_at":"2018-02-15T17:55:56Z","updated_at":"2018-02-15T17:55:56Z","author_association":"OWNER","body":"This is by design.  You cannot inject the INavService into anything other than a ViewModel that is associated with a Page.\r\n\r\nNo, navigation in XF is not based, and cannot be based, on a singleton.  Using singletons has nothing to do with avoiding memory leaks, and in fact can be a source of memory leaks if hooking into events."}}
{"actor":{"display_login":"brianlagunas"}}