Ryan Burnham
Ryan Burnham

Reputation: 2669

Ninject Interception at Namespace level?

Is their a way to set up interception with the Ninject.Extensions.Interception extension so it applies it to all classes in a Namespace or assembly?

Currenlty i have to do it per class like this

  Kernel.Bind<MyClass>().ToSelf().Intercept().With<ILoggerAspect>();

Upvotes: 0

Views: 175

Answers (1)

Ruben Bartelink
Ruben Bartelink

Reputation: 61795

Ninject.Extensions.Conventions should take care of this (though it doesn't influence any explicit Bindings you may have not generated via the conventions module).

See the Ninject.Extensions.Conventions wiki.

Upvotes: 1

Related Questions