Пример #1
0
        static void HandleResponse(Task <HTTPRequest_RetailerToClientGateway> response)
        {
            MonitorObject.StopMonitoring();
            Console.WriteLine("Command type received: " + response.Result.RetailCmd);
            Console.WriteLine("Request time: " + MonitorObject.TimeSpan);
            Console.WriteLine("Cookie received: " + response.Result.Cookie.CurrentCookieString);
            switch (response.Result.RetailCmd)
            {
            case HTTPRequest_ClientToGateway.RetailCommand.Login:
                ClientRequestResponse_Login.HandleLoginResponse(response);
                break;

            case HTTPRequest_ClientToGateway.RetailCommand.AddProduct:
                ClientRequestResponse_Basket.AddProductHandleResponse(response);
                break;

            case HTTPRequest_ClientToGateway.RetailCommand.RemoveProduct:
                break;

            case HTTPRequest_ClientToGateway.RetailCommand.ViewAllProducts:
                ClientRequestResponse_ViewProducts.ViewProductsHandleResponse(response);
                break;

            default:
                break;
            }
        }