public void dataCollect_textRecognitionReceived(object sender, TextName2 name) { }
public void consumerData_Received(object sender, BasicDeliverEventArgs ev) { string body = Encoding.UTF8.GetString(ev.Body); JsonSerializerSettings setting = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Objects }; textName2 = JsonConvert.DeserializeObject<TextName2>(body, setting); if (textRecognitionReceived != null) { textRecognitionReceived(this, textName2); Console.WriteLine("Data Received {0}",textName2.text2); } Console.WriteLine("Data Received {0}", textName2.text2); }