{"action":"created","issue":{"url":"https://api.github.com/repos/Caliburn-Micro/Caliburn.Micro/issues/375","repository_url":"https://api.github.com/repos/Caliburn-Micro/Caliburn.Micro","labels_url":"https://api.github.com/repos/Caliburn-Micro/Caliburn.Micro/issues/375/labels{/name}","comments_url":"https://api.github.com/repos/Caliburn-Micro/Caliburn.Micro/issues/375/comments","events_url":"https://api.github.com/repos/Caliburn-Micro/Caliburn.Micro/issues/375/events","html_url":"https://github.com/Caliburn-Micro/Caliburn.Micro/issues/375","id":180539721,"number":375,"title":"Enable SimpleContainer to resolve multiple parameters of same type","user":{"login":"jongleur1983","id":2063360,"avatar_url":"https://avatars.githubusercontent.com/u/2063360?v=3","gravatar_id":"","url":"https://api.github.com/users/jongleur1983","html_url":"https://github.com/jongleur1983","followers_url":"https://api.github.com/users/jongleur1983/followers","following_url":"https://api.github.com/users/jongleur1983/following{/other_user}","gists_url":"https://api.github.com/users/jongleur1983/gists{/gist_id}","starred_url":"https://api.github.com/users/jongleur1983/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jongleur1983/subscriptions","organizations_url":"https://api.github.com/users/jongleur1983/orgs","repos_url":"https://api.github.com/users/jongleur1983/repos","events_url":"https://api.github.com/users/jongleur1983/events{/privacy}","received_events_url":"https://api.github.com/users/jongleur1983/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-02T22:28:32Z","updated_at":"2016-10-02T23:19:04Z","closed_at":null,"body":"The SimpleContainer is what it's called: quite simple.\r\nNevertheless I propose to extend it slightly to better support more than one parameter of the same type.\r\nConsider a constructor with the following signature\r\n\r\n```public Point(int x, int y)```\r\n\r\nWithout knowing the internal implementation it's clear that x and y may have to be different values. Currently it's possible to register one instance per type (e.g. int) without a key, or different ones with different keys, where a key is a string value.\r\nThese keys are not considered by the constructor resolution, yet.\r\n\r\nI propose to change this as follows:\r\nFor each constructor argument look for registered instances of matching type. If there's one where the key matches the arguments name, take it, else take another (as it has been done before)."},"comment":{"url":"https://api.github.com/repos/Caliburn-Micro/Caliburn.Micro/issues/comments/251003194","html_url":"https://github.com/Caliburn-Micro/Caliburn.Micro/issues/375#issuecomment-251003194","issue_url":"https://api.github.com/repos/Caliburn-Micro/Caliburn.Micro/issues/375","id":251003194,"user":{"login":"nigel-sampson","id":1256017,"avatar_url":"https://avatars.githubusercontent.com/u/1256017?v=3","gravatar_id":"","url":"https://api.github.com/users/nigel-sampson","html_url":"https://github.com/nigel-sampson","followers_url":"https://api.github.com/users/nigel-sampson/followers","following_url":"https://api.github.com/users/nigel-sampson/following{/other_user}","gists_url":"https://api.github.com/users/nigel-sampson/gists{/gist_id}","starred_url":"https://api.github.com/users/nigel-sampson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigel-sampson/subscriptions","organizations_url":"https://api.github.com/users/nigel-sampson/orgs","repos_url":"https://api.github.com/users/nigel-sampson/repos","events_url":"https://api.github.com/users/nigel-sampson/events{/privacy}","received_events_url":"https://api.github.com/users/nigel-sampson/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T23:19:04Z","updated_at":"2016-10-02T23:19:04Z","body":"Not sold on this at the moment.\r\n\r\nI feel like we're straying away from **Simple** with this change and that if this sort of functionality is desired then a more fully featured container is the better path to go down.\r\n\r\nI don't want to bit by bit add more and more functionality to `SimpleContainer` and find ourselves in a years time supporting a fully featured container.\r\n\r\nBut having said that we have to draw the line somewhere, is it here?"}}
{"actor":{"display_login":"nigel-sampson"}}