コード例 #1
0
        private async void Transmit(ProtoMessage prtoMessage, bool log = true)
        {
            if (log)
            {
                txtMessages.Text += "Send: " + OpenApiMessagesPresentation.ToString(prtoMessage);
                txtMessages.Text += Environment.NewLine;
            }

            if (string.IsNullOrWhiteSpace(prtoMessage.ClientMsgId))
            {
                prtoMessage.ClientMsgId = "Client Message";
            }

            await _client.SendMessage(prtoMessage);
        }
コード例 #2
0
 private void OnMessage(ProtoMessage message)
 {
     readQueueSync.Enqueue("Received: " + OpenApiMessagesPresentation.ToString(message));
 }