Questions tagged [ninject-interception]

Ninject Interception is a Ninject Extension project which facilitates interception, a design pattern commonly used in Aspect Oriented Programming (AOP). It does this through the use of proxies, namely DynamicProxy implementations of either the Castle or Linfu variety. AOP can be used to reduce or eliminate repetitive lines of code for common cross-cutting concerns, such as logging and error-handling.

Ninject Interception is a Ninject Extension project which facilitates the use of interceptors, a design pattern commonly used in Aspect Oriented Programming (AOP). It does this through the use of proxies, namely DynamicProxy implementations of either the Castle or Linfu variety. AOP can be used to reduce or eliminate repetitive lines of code for common cross-cutting concerns, such as logging and error-handling.

60 questions
0
votes
0 answers

Private variable is null with Ninject Interception after upgrading from 2.2 to 3.2

I upgraded Ninject from 2.2 to 3.2. Before, the interception worked fine, but now if I set a breakpoint I can see that the parameterless constructor is getting called after the constructor that has the parameters that Ninject is injecting. It wasn't…
adam0101
  • 29,096
  • 21
  • 96
  • 174
0
votes
2 answers

Iterating List in a Anonymous Type

I am using Ninject Interception extension to implement SQLLogging. I have a variable called 'param' and it is an Anonymous type as it showed in Watch window (See the picture below). When I do param.ToString() it returned {Countries =…
0
votes
1 answer

Generic argument in dynamic proxy interceptor

To add and retrieve objects from memory cache I have a cache util class with these methods: public static T GetNativeItem(string itemKey) public static void AddNativeItem(string key, object item, TimeSpan timeout) to remove some noise from data…
ale
  • 10,012
  • 5
  • 40
  • 49
0
votes
1 answer

How to inject an action into a command using Ninject?

Actually exploring the Command Pattern and finds it pretty interesting. I'm writing a WPF Windows App following the MVVM Architectural Pattern. I've begun with these post which explain the basics. Basic MVVM and ICommand usuage example Simplify…
Will Marcouiller
  • 23,773
  • 22
  • 96
  • 162
0
votes
1 answer

Add ViewModel to View type mapping for intercepted types

I'm using Caliburn Micro and Ninject together in a WPF app. I'm using Ninject.Extensions.Interception to intercept and log calls to my ViewModels, however this is preventing Caliburn to locate the view for ViewModels because Caliburn is being handed…
Eric Scherrer
  • 3,328
  • 1
  • 19
  • 34
0
votes
0 answers

Ninject Interception not working with MVC 5

I am trying to implement an InterceptAttribute which should intercept any method I add the attribute to. I have it working in a WebAPI solution, however, I cannot get it to work in an MVC 5 application. The code is the same in both projects. The…
0
votes
1 answer

Ninject interception in multithreaded environment

I'm trying to create an interceptor using Ninject.Extensions.Interception.DynamixProxy to log method completion times. In a single threaded environment something like this works: public class TimingInterceptor : SimpleInterceptor { readonly…
neo112
  • 1,703
  • 2
  • 17
  • 39
0
votes
1 answer

.net MVC controllers interception with Ninject

I have MVC 4 project and Ninject 3 all wired up. Now I want to handle interception on my MVC Controller methods. If I add this: kernel.Bind().ToSelf().Intercept().With(); it kinda…
Goran
  • 1,807
  • 7
  • 27
  • 41
0
votes
1 answer

Ninject. Strange intercept to inner set-properties

Domain object: TargetObject.cs public class TargetObject { public virtual ChildTargetObject ChildTargetObject { get { return ChildTargetObjectInner; } set { ChildTargetObjectInner = value; } …
Dmitriy D
  • 13
  • 3
0
votes
1 answer

How to setup ninject when injection and Module binding (nInjectModule) into separate assembly

Following is project structure: MVC 4 application 1) Project is for MVC having controller has injected interfaces. 2) interfaces are existed into this application. Manager library project. 1) Project contain refernece of MVC…
0
votes
2 answers

Attempt to resolve item from Ninject in IInterceptor fails

I am attempting to use Ninject on my current project, and up to now, have been loving it. I am in the middle of attempting to configure an IInterceptor object to intercept and handle a failed method call to my service layer. This is hosted in an…
0
votes
1 answer

Wrong interceptor is chosen when multiple bindings exist

I have multiple implementations of an interface and I want to apply different interceptors for each of them e.g.: public interface IFoo { int Run(); } public class Foo1 : IFoo { public int Run() { return 1; } } public class Foo2 : IFoo { …
orientman
  • 31
  • 3
0
votes
0 answers

Ninject Interception 3.0 Interface proxy by method attributes

I have just upgraded a relatively large codebase from Ninject 2.2 to Ninject 3.0. Everything seems to be going as planned except I had to make a few changes to the interception stuff that we use. interface IFoo { Bar GetBar(); } class Foo :…
jamespconnor
  • 1,382
  • 14
  • 29
0
votes
1 answer

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 …
Ryan Burnham
  • 2,619
  • 3
  • 27
  • 43
-1
votes
1 answer

Web API sometime working some time failed in Windows Azure "NetworkError": 500 Internal Server Error

We Have Deployed our first application on Windows azure with Windows SQL Azure Database. In my application we facing sometime to execute Web services to complete implementation. We Configured all required setting and web site working properly but…
1 2 3
4