// Get Message from Queue private void OnMessage(IMessage receivedMsg) { ITextMessage textMessage = receivedMsg as ITextMessage; DecodeResponse response = new DecodeResponse(); response.FileName = textMessage.Properties.GetString("fileName"); response.Key = textMessage.Properties.GetString("key"); response.Secret = textMessage.Properties.GetString("secret"); response.Text = textMessage.Text; response.Ratio = textMessage.Properties.GetFloat("ratio"); Trace.WriteLine("Received key : " + response.Key); Trace.WriteLine("Received Filename : " + response.FileName); // response = "".Equals(response.Key) ? null : response; if ("".Equals(response.Key)) { Trace.WriteLine("Key is null"); } DecodeFileService.AddResponses(response.FileName, response); }
public static void AddResponses(String fileName, DecodeResponse response) { responses.Add(fileName, response); }