A few months ago I discovered PostSharp, and for a while it was good.
But then the legal came back with a response saying that they did not like the license for the old versions. Then the department told me that the price of 2.0 was unacceptably high (for the number of places we need) ... I was extremely hidden, but not discouraged. I could not be the only such card.
I continued to search for a replacement, but most of them were either dead or poorly maintained (especially in the documentation department), for academic use, or all of the above (I look at you as Aspect.Net)
Then I discovered Spring.Net, and for a while it was good.
I read the documentation, and she continued to paint what seemed like a supernatural picture of AOP nirvana. I was no longer tied to attributes to mark where I needed code interception, but it can be configured in XML and changes to it do not require recompilation. Excellent.
Then I looked at the samples and saw the following in each use case:
// Create AOP proxy using Spring.NET IoC container. IApplicationContext ctx = ContextRegistry.GetContext(); ICommand command = (ICommand)ctx["myServiceCommand"]; command.Execute(); if (command.IsUndoCapable) { command.UnExecute(); }
Why should the first two lines of code exist? It destroys everything. This means that I canβt just provide the user with a set of XML aspects and attributes or configurations that they can use by attaching the appropriate attributes to the corresponding methods / classes / etc or editing the mapping template in XML. They must change their programming logic to make this work!
Is there any way to make Spring.Net behave like PostSharp in this case? (that is, the user only needs to add XML attributes / configuration, and not edit the contents of any methods.
Alternatively, is there a decent and current alternative to PostSharp? I saw several questions like this on SO, but not one of them was really going to replace PostSharp, they just wanted to complement its functionality. I need a complete replacement.