示例#1
0
    public ProtoMessage GetActionReply(Actions action, TextTestClient client)
    {
        ProtoMessage responseTask = client.GetReply();

        while (responseTask.ActionType != action)
        {
            responseTask = client.GetReply();
        }
        client.ClearMessageQueues();
        return(responseTask);
    }
    public Task <ProtoMessage> GetActionReply(Actions action, TextTestClient client)
    {
        Task <ProtoMessage> responseTask = client.GetReply();

        responseTask.Wait();
        while (responseTask.Result.ActionType != action)
        {
            responseTask = client.GetReply();
            responseTask.Wait();
        }
        client.ClearMessageQueues();
        return(responseTask);
    }
示例#3
0
        public ProtoMessage GetActionReply(Actions action, TextTestClient client)
        {
            ProtoMessage responseTask = client.GetReply();

            //Thread t = new Thread(new ThreadStart(client.GetReply));
            //ThreadPool.QueueUserWorkItem(new WaitCallback(client.GetReply));
            //responseTask.Wait();
            while (responseTask.ActionType != action)
            {
                responseTask = client.GetReply();
            }
            client.ClearMessageQueues();
            return(responseTask);
        }