internal void OnClientRequest(ClientCommandEventArgs args) { if (ClientRequest != null) { ClientRequest(this, args); } }
internal void OnClientResponse(ClientCommandEventArgs args) { if (ClientResponse != null) { ClientResponse(this, args); } }
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); }
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; } }
internal void OnClientResponse(ClientCommandEventArgs args) { if (ClientResponse != null) ClientResponse(this, args); }
internal void OnClientRequest(ClientCommandEventArgs args) { if (ClientRequest != null) ClientRequest(this, args); }
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; } }
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); }