public void RequestShuffle(string shuffleId)
        {
            shuffleId = ValidateAndNormalizeContainerName(shuffleId);
            CloudBlobContainer shuffleContainer = this.GetShuffleContainer(shuffleId);

            // Mark the container as no longer able to accept images
            shuffleContainer.Metadata[ReadonlyContainerKey] = bool.TrueString;
            shuffleContainer.SetMetadata();

            // Create the queue message and post it
            CloudQueue shuffleQueue = this.GetShuffleQueue();

            ShuffleRequestMessage newShuffleRequest = new ShuffleRequestMessage()
            {
                ShuffleId = shuffleId
            };

            JavaScriptSerializer serializer = new JavaScriptSerializer();
            CloudQueueMessage message = new CloudQueueMessage(serializer.Serialize(newShuffleRequest));

            shuffleQueue.AddMessage(message);
        }
Exemple #2
0
        public void RequestShuffle(string shuffleId)
        {
            shuffleId = ValidateAndNormalizeContainerName(shuffleId);
            CloudBlobContainer shuffleContainer = this.GetShuffleContainer(shuffleId);

            // Mark the container as no longer able to accept images
            shuffleContainer.Metadata[ReadonlyContainerKey] = bool.TrueString;
            shuffleContainer.SetMetadata();

            // Create the queue message and post it
            CloudQueue shuffleQueue = this.GetShuffleQueue();

            ShuffleRequestMessage newShuffleRequest = new ShuffleRequestMessage()
            {
                ShuffleId = shuffleId
            };

            JavaScriptSerializer serializer = new JavaScriptSerializer();
            CloudQueueMessage    message    = new CloudQueueMessage(serializer.Serialize(newShuffleRequest));

            shuffleQueue.AddMessage(message);
        }