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

GetInstance not complete (missing ServiceType == null case) #2

Open
tracstarr opened this issue Aug 26, 2011 · 4 comments
Open

GetInstance not complete (missing ServiceType == null case) #2

tracstarr opened this issue Aug 26, 2011 · 4 comments
Assignees
Labels

Comments

@tracstarr
Copy link

When trying to use Bind.Model in xaml the Caliburn.Micro.Bind.ModelChanged function will call IoC.GetInstance(null, key), which is not handled in the bootstrapper getinstance method.

@ghost ghost assigned dbuksbaum Aug 26, 2011
@dbuksbaum
Copy link
Owner

Autofac does not support resolving by name without a type. When I checked the Caliburn.Micro discussions on this issue, there was a change recently to other areas of the code base to eliminate this type of look up. I am going to check with Rob to see if this is behavior is intended.

When I looked at the CM code, this seems like something that be easily resolved. The type is known at the point of the GetInstance call, it is just not used.

The link to the Caliburn.Micro discussion topic is http://caliburnmicro.codeplex.com/discussions/270835.

@tracstarr
Copy link
Author

thanks. let me know if you find out anything more. I agree that it's an issue in caliburn as it (obviously) leaves restrictions on IOC when not necessary. I've had to hack in my own fix for now.

@dbuksbaum
Copy link
Owner

What did you do as a fix?

@tracstarr
Copy link
Author

I just overrode GetInstance, and when the specific key name was passed in i had to create an if statement and then manually trying to resolve by the corresponding type. Not really a clean solution, but the only one. I'm sure i could make it more generic, but i don't have time to deal with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants