Example #1
0
 internal void OnClientRequest(ClientCommandEventArgs args)
 {
     if (ClientRequest != null)
     {
         ClientRequest(this, args);
     }
 }
Example #2
0
 internal void OnClientResponse(ClientCommandEventArgs args)
 {
     if (ClientResponse != null)
     {
         ClientResponse(this, args);
     }
 }
Example #3
0
        internal void Request(ServiceType serviceType, IEnumerable <Message> request)
        {
            currentRequest     = request;
            currentRequestTime = DateTime.Now;
            currentServiceType = serviceType;

            ClientCommandEventArgs args = new ClientCommandEventArgs(LocalEndPoint, remoteEndPoint, currentServiceType,
                                                                     currentRequest, currentRequestTime);

            service.OnClientRequest(args);
        }
Example #4
0
        internal void Response(IEnumerable <Message> response)
        {
            ClientCommandEventArgs args = new ClientCommandEventArgs(LocalEndPoint, remoteEndPoint, currentServiceType,
                                                                     currentRequest, currentRequestTime, response, DateTime.Now);

            try {
                service.OnClientResponse(args);
                //TODO: should we store the entire command?
                commandCount++;
            } finally {
                currentRequest = null;
            }
        }
Example #5
0
 internal void OnClientResponse(ClientCommandEventArgs args)
 {
     if (ClientResponse != null)
         ClientResponse(this, args);
 }
Example #6
0
 internal void OnClientRequest(ClientCommandEventArgs args)
 {
     if (ClientRequest != null)
         ClientRequest(this, args);
 }
Example #7
0
        internal void Response(Message response)
        {
            ClientCommandEventArgs args = new ClientCommandEventArgs(LocalEndPoint, remoteEndPoint, currentServiceType,
                                                                     currentRequest, currentRequestTime, response, DateTime.Now);

            try {
                service.OnClientResponse(args);
                //TODO: should we store the entire command?
                commandCount++;
            } finally {
                currentRequest = null;
            }
        }
Example #8
0
        internal void Request(ServiceType serviceType, Message request)
        {
            currentRequest = request;
            currentRequestTime = DateTime.Now;
            currentServiceType = serviceType;

            ClientCommandEventArgs args = new ClientCommandEventArgs(LocalEndPoint, remoteEndPoint, currentServiceType,
                                                                     currentRequest, currentRequestTime);

            service.OnClientRequest(args);
        }