You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2020. It is now read-only.
it all worked when I used the Nancy internal IoC. With this lib I now get this exception:
A first chance exception of type 'Ninject.ActivationException' occurred in Ninject.dll
Additional information: Error activating IntPtr
No matching bindings are available, and the type is not self-bindable.
Activation path:
4) Injection of dependency IntPtr into parameter method of constructor of type Func{IRouteCache}
3) Injection of dependency Func{IRouteCache} into parameter routeCacheFactory of constructor of type DefaultRouteCacheProvider
2) Injection of dependency IDiagnosticsProvider into parameter diagnosticProviders of constructor of type DefaultDiagnostics
Request for IDiagnostics
I am using the latest stable nuget packages:
Nancy 0.23.2
Nancy.Bootstrappers.Ninject 0.23.2
Ninject 3.0.1.10
Ninject.Extensions.ChildKernel 3.0.0.5
I have a workaround. Injecting this bind in the bootstrapper:
protected override void ConfigureApplicationContainer(IKernel existingContainer)
{
base.ConfigureApplicationContainer(existingContainer);
existingContainer.Rebind<Func<IRouteCache>>().ToMethod(ctx =>
() => ctx.Kernel.Get<IRouteCache>());
// A Bind might be enough.
}
The problem might be that Ninject cannot inject into constructor parameters of type Func<Interface> as is the case in DefaultRouteCacheProvider.
Am I doing anything wrong or am I just the first to notice this?
Hi,
it all worked when I used the Nancy internal IoC. With this lib I now get this exception:
I am using the latest stable nuget packages:
I have a workaround. Injecting this bind in the bootstrapper:
The problem might be that Ninject cannot inject into constructor parameters of type
Func<Interface>as is the case inDefaultRouteCacheProvider.Am I doing anything wrong or am I just the first to notice this?