I am using Unity Container for interception and so am trying to add a [Trace] attribute, e.g.
public class TraceAttribute : HandlerAttribute
and then in code, I can use it like so:
public class MyClass
{
[Trace]
public void DoSomething()
{
...
}
}
Here's my question/goal: I don't want the Trace attribute to be tied to the Unity Interception. If I later change DI containers, or want to implement my own, etc. I'd like to swap it out, much like we do for interfaces.
something like:
public interface TraceAttribute : ITraceAttribute
and then have a specific implementation? is that possible?
One of the challenges we are facing is that everywhere I use the Trace attribute, I have to have Unity assembly installed, and I'd like to avoid that.
Thanks!