Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Intercept]
- public string Method1(POS pos, int param1, string param2)
- {
- return String.Format("{0}: {1}", param1,param2);
- }
- [Intercept]
- public int Method2(POS pos, int param3)
- {
- return param3 * 2;
- }
- public void OnPreProcessing(...)
- {
- // Before Mothod1 and Method2 called, It should enter here
- // I want to be able to cancel method execution and return another value.
- // I want to get the method name, parameter names and values
- }
- public IMessage SyncProcessMessage(IMessage msg)
- {
- var mcm = msg as IMethodCallMessage;
- OnPreProcessing(ref mcm);
- var retMsg = _NextSink.SyncProcessMessage(msg) as IMethodReturnMessage;
- OnPostProcessing(mcm, ref retMsg);
- return retMsg;
- }
Add Comment
Please, Sign In to add comment