function decorators in c# function decorators in c# python python

function decorators in c#


You can do that using Post Sharp. Check out the demo video for instructions.


you can sort of achieve that by "ContextBoundObject" in the .NET framework.but it's a bit convoluted because it basically uses .net remoting infrastructure to intercept method calls. (the runtime overhead is minimum if your calls are within the same app domain but just across different "context").so the better approaches would be the ones mentioned above by the other posters.