Questions tagged [unity-interception]

Unity is an IOC/DI framework from the Microsoft Enterprise Patterns and Practices Library. It also has cross-cutting (Aspect like) capabilities in the form of Interceptors

Unity allows developers to wire up Interceptors to be injected at the class or method level. This gives the developer the ability to introduce logic that is invoked anytime a method on the configured class/method is called. This magic is possible when Unity is used as an Object Factory, where it creates a dynamic proxy class in front of the implementation class at runtime.

72 questions
0
votes
0 answers

Unity(3.5) Interception Not Working in MVC

I am trying to incorporate Interception using PolicyInjectionBehavior and get the this error: Exception information: Exception type: ResolutionFailedException Exception message: Resolution of the dependency failed, type =…
0
votes
1 answer

Attribute-based property interception. How?

I have an abstract class for entities which are responsible for generating and returning an unique key for every Entity instance. The key generation is a bit costly and is based on the property values of the concrete entity. I already mark the…
Jani Hyytiäinen
  • 5,293
  • 36
  • 45
0
votes
1 answer

Interception with Unity in Prism v2 for WPF (not working for me)

I cannot get interception to work with Prism v2 (Oct 2009). I am trying to intercept the Setter for any Public Properties and then fire the PropertyChanged event if the property has changed. I can see that the code gets executed (by stepping through…
0
votes
1 answer

Resolve multiple implementation of a single interface in unity

I have the following scenario : public interface IFoo { } public interface IFoo3 { } public class Foo4 : IFoo3 { } public class Foo1 : IFoo { } public class Foo2 : IFoo { Foo2 (IFoo object1, IFoo3 object2) } on the client side : …
0
votes
1 answer

Difference in the order when executing Unity HandlerAttributes assigned to class and property

I have 3 attributes I am using for my Inteception pipeline in Unity v2.1. Everything is firing off properly they are just in the wrong order. In all 3 Attributes I have made sure I am passing the corresponding Handler the Order from the…
lucusc
  • 23
  • 4
0
votes
1 answer

Using default constructor and parameterised constructor in unity c#

I have an application that uses unity FW to resolve objects throughout. I have done some change to the framework and the classes which can be seen in the code comment as "NEW CHANGE" The wrapper class looks like public static class…
keyr
  • 990
  • 13
  • 27
0
votes
1 answer

Castle Interceptor not Intercepting

I have a lot of code I want to add logging to. My plan was to use Unity or Castle.Windsor to create an intercepted logging routine, and to add it to existing code by using a custom C# attribute. I cannot change the existing code structure (but I can…
flacnut
  • 1,030
  • 4
  • 11
  • 21
0
votes
1 answer

Unity Interception and classes with Circular Reference

My rich domain model has some circular reference, and this is intentional. I am also writing my own ORM for more control, and to detect changes made to properties I am using Unity to intercept any call to setters and trigger the property change…
0
votes
1 answer

Microsoft Unity base class interception

I have an application that has a base class and derived classes from it with each implementation class having it's own interface. I would like to use Unity's interception for exception handling on derived types of a base class. I am new to…
civan
  • 254
  • 3
  • 9
0
votes
2 answers

Unity + Interception + Fakes = Big Ball of Fire

I am having trouble with making Unity play nice with the new Fakes framework (formerly pex & moles) When I tried to create fakes of the unity interception library, it caused my unit test to run fine when debugging, but breaks with…
Alwyn
  • 8,079
  • 12
  • 59
  • 107
0
votes
1 answer

Configure Interception with Unity AutoConfig in VB.NET

I'm trying to get interception working in vb.net since my work only allows that. The way I would use it is to configure say some logger so that every business logic function that gets run is intercepted and logged to the database (bad idea, but its…
ton.yeung
  • 4,793
  • 6
  • 41
  • 72
0
votes
1 answer

unity interception auto config in vb.net

I'm trying to get interception working in vb.net since my work only allows that. I've never encountered a lambda that has this If.something syntax before. scan.Include(If.Implements, (x, y) => { if…
ton.yeung
  • 4,793
  • 6
  • 41
  • 72
1 2 3 4
5