{"action":"created","issue":{"url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/233","repository_url":"https://api.github.com/repos/simpleinjector/SimpleInjector","labels_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/233/comments","events_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/233/events","html_url":"https://github.com/simpleinjector/SimpleInjector/issues/233","id":154723612,"number":233,"title":"Get 2 Transient instances in a Singelton?","user":{"login":"AnderssonPeter","id":1308309,"avatar_url":"https://avatars.githubusercontent.com/u/1308309?v=3","gravatar_id":"","url":"https://api.github.com/users/AnderssonPeter","html_url":"https://github.com/AnderssonPeter","followers_url":"https://api.github.com/users/AnderssonPeter/followers","following_url":"https://api.github.com/users/AnderssonPeter/following{/other_user}","gists_url":"https://api.github.com/users/AnderssonPeter/gists{/gist_id}","starred_url":"https://api.github.com/users/AnderssonPeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnderssonPeter/subscriptions","organizations_url":"https://api.github.com/users/AnderssonPeter/orgs","repos_url":"https://api.github.com/users/AnderssonPeter/repos","events_url":"https://api.github.com/users/AnderssonPeter/events{/privacy}","received_events_url":"https://api.github.com/users/AnderssonPeter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/simpleinjector/SimpleInjector/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-13T14:23:47Z","updated_at":"2016-05-14T06:04:07Z","closed_at":null,"body":"I'm using WPF and the MVVM pattern.\r\n\r\nWhen I'm executing anything that's long running i want to display a loading indicator so i created a `BusyViewModel` for that.\r\nNow i want to get a new instance of this for each long running task, so lets say I have 2 one for `Saving` and one for `Loading`.\r\n\r\n```\r\nmContainer.Register(Of BusyViewMode)(Lifestyle.Transient)\r\nmContainer.RegisterSingleton(Of ShellViewModel)()\r\nmContainer.Verify()\r\n```\r\n\r\nAnd the constructor for `ShellViewModel` has the following parameters `BusyViewMode savingBusyViewMode, BusyViewMode loadingBusyViewMode`.\r\n\r\nWhen I call verify I get a exception that tells me my `Lifestyle`s are mismatching, so my second attempt was to take a `Func<BusyViewMode>` as parameter to the constructor but that didn't work either.\r\n\r\nSo I my idea totally stupid or how would I solve this? \r\n"},"comment":{"url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/comments/219203072","html_url":"https://github.com/simpleinjector/SimpleInjector/issues/233#issuecomment-219203072","issue_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/233","id":219203072,"user":{"login":"AnderssonPeter","id":1308309,"avatar_url":"https://avatars.githubusercontent.com/u/1308309?v=3","gravatar_id":"","url":"https://api.github.com/users/AnderssonPeter","html_url":"https://github.com/AnderssonPeter","followers_url":"https://api.github.com/users/AnderssonPeter/followers","following_url":"https://api.github.com/users/AnderssonPeter/following{/other_user}","gists_url":"https://api.github.com/users/AnderssonPeter/gists{/gist_id}","starred_url":"https://api.github.com/users/AnderssonPeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnderssonPeter/subscriptions","organizations_url":"https://api.github.com/users/AnderssonPeter/orgs","repos_url":"https://api.github.com/users/AnderssonPeter/repos","events_url":"https://api.github.com/users/AnderssonPeter/events{/privacy}","received_events_url":"https://api.github.com/users/AnderssonPeter/received_events","type":"User","site_admin":false},"created_at":"2016-05-14T06:04:07Z","updated_at":"2016-05-14T06:04:07Z","body":"Yes each view model should get their own view i haven't managed to test it yet but that's the idea.\r\n\r\nBut using a single one might also work I just have to redesign it so it can have multiplie texts."}}