Example #1
0
 public void BeforeSendReply(ref Message reply, object correlationState)
 {
     MessageInspector.cmdInfo cmd = (MessageInspector.cmdInfo)correlationState;
     if (null != cmd)
     {
         CmdMonitor.RecordCmdDetail(cmd.cmdName, TimeUtil.NOW() - cmd.receiveTicks, (long)cmd.cmdSize, TCPProcessCmdResults.RESULT_OK);
     }
 }
Example #2
0
        public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext)
        {
            string action = request.Headers.Action;
            object result;

            if (action.Length > 20)
            {
                MessageInspector.cmdInfo cmd = new MessageInspector.cmdInfo
                {
                    cmdName      = action.Substring(19),
                    cmdSize      = 0,
                    receiveTicks = TimeUtil.NOW()
                };
                result = cmd;
            }
            else
            {
                result = null;
            }
            return(result);
        }