protected void collectData(CollectTask collectTask)
        {
            var result = apiHelper.GetResult(collectTask);

            if (result != null)
            {
                var messageToSend = new CollectTaskResult();
                messageToSend.Result = result;
                messageToSend.Task = collectTask;

                sendResult(messageToSend);
            }
        }
        private void sendResult(CollectTaskResult result)
        {
            var bFrmt = new BinaryFormatter();
            var outputStream = new MemoryStream();
            bFrmt.Serialize(outputStream, result);
            var byteResult = outputStream.ToArray();

            CloudQueueMessage msg = formatMessageWitResult(byteResult);
            resultQueue.AddMessage(msg);

            Trace.TraceInformation("Result sended: " + result.Task.Method);
        }