Comments (8)
Also, it might be a good idea to republish the nuget packages with a version range to prevent people from updating ninject unknowingly.
from agatha.
haven't really planned an update to NInject 3.0 yet... If you need it
urgently, I'd welcome a pull request :)
On Tue, Apr 24, 2012 at 9:56 PM, Michael Aird <
[email protected]
wrote:
It looks like Ninject 3.0 has removed a method that the Agatha Ninject
container relies on. When i try to run it, i get the following error:[MissingMethodException: Method not found:
'Ninject.Syntax.IBindingToSyntax`1<System.Object>
Ninject.Syntax.IBindingRoot.Bind(System.Type)'.]
Agatha.Ninject.Container.Register(Type componentType, Type
implementationType, Lifestyle lifeStyle) in
c:\src\agatha\Agatha.Ninject\Container.cs:23Agatha.ServiceLayer.ServiceLayerConfiguration.RegisterRequestHandlerInterceptor()
in c:\src\agatha\Agatha.ServiceLayer\ServiceLayerConfiguration.cs:190Agatha.ServiceLayer.ServiceLayerAndClientConfiguration.RegisterRequestHandlerInterceptor()
in
c:\src\agatha\Agatha.ServiceLayer\ServiceLayerAndClientConfiguration.cs:108Is there a work-around for this? or a planned update to support Ninject
3.0?Thanks,
Michael.
Reply to this email directly or view it on GitHub:
#23
from agatha.
Gotcha. I'll see if i can pull something together this week and submit a pull request.
from agatha.
Upgraded nuget package to Ninject 3.0.0.15
All configuration tests succeed.
Which versions of Agatha/Ninject are you using?
from agatha.
I'm using v1.3 from Nuget.
When I look at it in JustDecompile, the method looks like this:
public ServiceLayerConfiguration RegisterRequestHandlerInterceptor()
{
this.registeredInterceptors.Add(typeof(T));
this.container.Register(typeof(T), typeof(T), Lifestyle.Transient);
return this;
}
but in the current code it looks like this:
public ServiceLayerConfiguration RegisterRequestHandlerInterceptor() where T : IRequestHandlerInterceptor
{
registeredInterceptors.Add(typeof(T));
return this;
}
Did this get updated but the nuget package didn't?
from agatha.
The registration part was moved in the version below, but the same signature is used to register the components.
I don't think it makes a difference in this case.
ba8566a#diff-0
from agatha.
I think i found the culprit.
Ninject 3 changed the method signature in this commit: ninject/Ninject@83c8f53#diff-28
-
/// <summary>
30 50
/// Declares a binding from the service to itself.
31 51
///32
-
/// <param name="service">The service to bind.</param>
33
-
IBindingToSyntax<object> Bind(Type service);
52
-
/// <param name="services">The services to bind.</param>
53
-
/// <returns>The fluent syntax.</returns>
54
-
IBindingToSyntax<object> Bind(params Type[] services);
from taking a single object to taking an array. recompiling against ninject 3 makes the compiler re-resolve the method call and everything works.
I could do a local build of Agatha to deal with this but I'd really prefer to use the "official" nuget packages.
Any chance you could publish an updated nuget package that has been compiled against ninject 3?
Thanks,
Michael.
from agatha.
1.3.1 uses Ninject 3
from agatha.
Related Issues (13)
- Caching & Cross Thread exception HOT 4
- IContainer.Resolve method - Return a component instance by the key. HOT 12
- Common Logging HOT 3
- Question regarding update to Castle 3.0 and nuget package HOT 2
- Castle.Core StackOverflow on Silverlight Client when calling Release Method of IContainer HOT 1
- Simulator.Shared.ApplicationCore doesn't contain a constructor which takes 1 arguments
- Polymorphic RequestHandler
- FileLoadException running ApiController method under test HOT 1
- How to unit test Agatha handlers HOT 7
- Decouple "logging" from Agatha HOT 1
- Agatha REST implementation with angularJs
- Using latest version of Castle.Windsor 2.5.3 (with Castle.Core 2.5.2) HOT 4
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 agatha.