private void Z_ReplyReady(object sender, As.MDPCommons.MDPReplyEventArgs e) { var msg = e.Reply.Pop(); var serviceName = msg.ConvertToString(); Console.WriteLine("service name is: " + msg.ConvertToString()); if (serviceName == "mmi.service") { CreateServiceClients(e.Reply.Pop().ConvertToString().Split(new char[] { ',' })); Run(); } else { if (serviceQueue.ContainsKey(serviceName) == false) { throw new Exception($"Service response found with unexpected name - {serviceName}"); } serviceQueue[serviceName].OnResponse(e.Reply); Console.WriteLine("message is: " + msg.ConvertToString()); } }
/// <summary> /// broadcast the logging information if someone is listening /// </summary> /// <param name="e"></param> protected virtual void OnReplyReady(MDPReplyEventArgs e) { ReplyReady?.Invoke(this, e); }