Skip to content

Using Client in a class library and unit testing process fails to get message response #181

Answered by Mudoch
Mudoch asked this question in Q&A
Discussion options

You must be logged in to vote

Well after much review of the overall process and the fact that in the Class Lib I could not get an Invoke of my logging call, I switched to Client.SendAndWait(). This solved my issues and provided a cleaner request/response handshake process and it'll remove the need to provide what command triggered the response.

Here is the server side code yet to remove the command kick back:

    private SyncResponse SyncRequestReceived(SyncRequest req)
    {
      RequestIn rqIn;
      string Resp = null;
      string sData = Encoding.UTF8.GetString(req.Data);
      try
      {
        rqIn = JsonSerializer.Deserialize<RequestIn>(sData);
      }
      catch (Exception ex)
      {
        {
          …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Mudoch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant