Comments (3)
I can't reproduce this using master or develop. Any steps to repro?
from agentmulder.
OK. Got it - I used a memory profiler. The problem is in the Ninject container's BindBasePattern. The code is checking to see if the current type implements Ninject's IBindingRoot interface, and to do so, it creates an instance of IDeclaredType and stores it in the class. The only problem is that the ComponentRegistration classes have the same lifetime as the shell, and the IDeclaredType instance has been created using an IPsiModule of the solution. This keeps the solution in scope, and so ReSharper complains.
When you re-open the solution (I bet it's a Ninject solution), the Ninject bindings are trying to match against a type representing IBindingRoot created with a different solution. I suspect that will fail.
You should be able to sort this by either not saving the created bindingRootType in a field, or by changing the call to IsDescendantOf to TypeElementUtil.GetAllSuperTypes and walk the returned list comparing fully qualified names. I haven't looked into the performance implications of either method...
from agentmulder.
Matt, have I mentioned how awesome you are?!? :)
It was indeed in a Ninject solution where I encountered this! Also, you have hit the nail on the head - that's exactly where the problem is!
I have refactored the entire hack that checks for the IBindingRoot into a helper extension (StructureMap needs the same check, as both Ninject and StructureMap have Module
-like classes, where the methods (For<>
, Bind<>
, etc) are members of the class, and not prefixed with an instance. SSR currently doesn't match implicit 'this', that's why I require that check.
I have already removed the static field, I will try to make the changes as you suggested!
Thanks again so very much!
from agentmulder.
Related Issues (20)
- Mulder doesn't work if the using statements are written inside the class definition
- NullReferenceException loading solution HOT 2
- Show unused constructors
- Autofac Register() method makes all types appear as "Registered by autofac" HOT 2
- DryIoc support please
- Resharper 9 support HOT 10
- Support for Moq
- MOQ Test for Hardcoded values HOT 2
- Not Recognising IoC Injected Types At All HOT 5
- Agent mulder does not show any visual cues at all
- Cannot install - Not found in the Extension Manager HOT 3
- Agent Mulder not found in extension manager for ReSharper 9.2 HOT 5
- Exception: "Collection was modified; enumeration operation may not execute."
- Resharper 10 support HOT 10
- Tests fail with R# 10 SDK HOT 5
- Many objects are marked as 'unused members' HOT 1
- LightInject support please
- Do plugin for VS 2015/Roslyn without ReSharper.
- Test execution issues
- ASP.NET 5 MVC 6 IoC Container Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agentmulder.