Ejemplo n.º 1
0
 internal void OnClientRequest(ClientCommandEventArgs args)
 {
     if (ClientRequest != null)
     {
         ClientRequest(this, args);
     }
 }
Ejemplo n.º 2
0
 internal void OnClientResponse(ClientCommandEventArgs args)
 {
     if (ClientResponse != null)
     {
         ClientResponse(this, args);
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 5
0
 internal void OnClientResponse(ClientCommandEventArgs args)
 {
     if (ClientResponse != null)
         ClientResponse(this, args);
 }
Ejemplo n.º 6
0
 internal void OnClientRequest(ClientCommandEventArgs args)
 {
     if (ClientRequest != null)
         ClientRequest(this, args);
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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);
        }