Reputation: 355
Is there a way to implement a method wrapper in C# a similar way as eg. it's done in Python?, using attribute? I'd like to access method's argument from inside the attribute code. I managed to do something similar when coding WCF application, using IOperationBehavior, but is it possible to do this using plain vanilla C# ?
Upvotes: 2
Views: 865
Reputation: 1500785
It sounds like you want Aspect Oriented Programming. This isn't part of the .NET platform in general, but there are various options available. You might want to look at PostSharp.
Upvotes: 5