示例#1
0
        public void CreatePick()
        {
            Pick pick = new Pick("Cocaine", 2);

            CloudQueueMessage message = new CloudQueueMessage(pick.SerializedPickString());
            _queue.AddMessage(message);
        }
示例#2
0
        public void ProcessPick()
        {
            CloudQueueMessage retrievedMessage = _queue.GetMessage();

            if (retrievedMessage != null)
            {
                Pick pick = new Pick(retrievedMessage.AsString);
                Trace.WriteLine(string.Format("Picked {0} doses for {1}.", pick.Quantity, pick.Item));
                _queue.DeleteMessage(retrievedMessage);
            }
        }