c# - Can I pass an object into my method using Unity AOP? -


i use aop wcf log calls webservices log in same way.

the log starts writing when call intercepted, details of what's going on, after returns, writes log saying has finished along exceptions webservice may have thrown.

what i'd pass logger object webservice add few log statements of own.

is possible using aop?

the code is:

    public imethodreturn invoke(imethodinvocation input,  getnextinterceptionbehaviordelegate getnext)     {         logger somelogger = new logger();         return getnext()(input, getnext);     } 

i'd either somelogger getnext() method webservice, or able access global context - global context won't work since webservice can process many requests @ once.

any ideas?


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -