/// <summary> /// Data received event handler for the channel. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ChannelDataReceived(object sender, ConversationContextChannelDataReceivedEventArgs e) { ConversationContextChannel conversationContextChannel = sender as ConversationContextChannel; Byte[] body_byte = new Byte[100]; string response = string.Empty; body_byte = e.ContentDescription.GetBody(); string contextData = System.Text.ASCIIEncoding.ASCII.GetString(body_byte); }
private void InnerChannel_DataReceived(object sender, ConversationContextChannelDataReceivedEventArgs e) { try { if (e.ContentDescription != null) { if (e.ContentDescription.ContentType.ToString().Equals(WireHelpers.Request, StringComparison.OrdinalIgnoreCase)) { requestType request = WireHelpers.ParseMessageBody <requestType>(e.ContentDescription.GetBody()); this.ProcessRequest(request); } else { //TODO:Log and ignore } } } catch (Exception) { //TODO: Log and ignore } }