public string CreateShuffle(string shuffleId) { ImageProcessingJobs processor = new ImageProcessingJobs(); IEnumerable<Uri> shuffleParts = this.storage.GetAllShuffleParts(shuffleId); Tuple<string, IEnumerable<string>> localImages = LoadImages(shuffleParts); return CreateThumbanils(localImages.Item1, localImages.Item2); }
public string CreateShuffle(string shuffleId) { ImageProcessingJobs processor = new ImageProcessingJobs(); IEnumerable <Uri> shuffleParts = this.storage.GetAllShuffleParts(shuffleId); Tuple <string, IEnumerable <string> > localImages = LoadImages(shuffleParts); return(CreateThumbanils(localImages.Item1, localImages.Item2)); }
/// <summary> /// Waits for message from the queue and creates shuffles /// </summary> /// <param name="shufflerequests">The message received from queue</param> public static void CreateShuffle( [QueueInput] ShuffleRequestMessage shufflerequests, IBinder binder) { string shuffleId = shufflerequests.ShuffleId; ImageProcessingJobs processor = new ImageProcessingJobs(); string shuffle = processor.CreateShuffle(shuffleId); Stream shuffleBlob = binder.Bind <Stream>(new BlobOutputAttribute("shuffle" + shuffleId + @"/shuffle.jpg")); using (Stream localShuffle = File.OpenRead(shuffle)) { localShuffle.CopyTo(shuffleBlob); } }
/// <summary> /// Waits for message from the queue and creates shuffles /// </summary> /// <param name="shufflerequests">The message received from queue</param> public static void CreateShuffle( [QueueInput] ShuffleRequestMessage shufflerequests, IBinder binder) { string shuffleId = shufflerequests.ShuffleId; ImageProcessingJobs processor = new ImageProcessingJobs(); string shuffle = processor.CreateShuffle(shuffleId); Stream shuffleBlob = binder.Bind<Stream>(new BlobOutputAttribute("shuffle" + shuffleId + @"/shuffle.jpg")); using (Stream localShuffle = File.OpenRead(shuffle)) { localShuffle.CopyTo(shuffleBlob); } }
/// <summary> /// Waits for message from the queue and creates shuffles /// </summary> /// <param name="shufflerequest">The message received from queue</param> public static void CreateShuffle( [QueueTrigger("shufflerequests")] ShuffleRequestMessage shufflerequest, IBinder binder) { string shuffleId = shufflerequest.ShuffleId; ImageProcessingJobs processor = new ImageProcessingJobs(); string shuffle = processor.CreateShuffle(shuffleId); BlobAttribute attribute = new BlobAttribute("shuffle" + shuffleId + @"/shuffle.jpg", FileAccess.Write); Stream shuffleBlob = binder.Bind<Stream>(attribute); using (Stream localShuffle = File.OpenRead(shuffle)) { localShuffle.CopyTo(shuffleBlob); } }
/// <summary> /// Waits for message from the queue and creates shuffles /// </summary> /// <param name="shufflerequest">The message received from queue</param> public static void CreateShuffle( [QueueTrigger("shufflerequests")] ShuffleRequestMessage shufflerequest, IBinder binder) { string shuffleId = shufflerequest.ShuffleId; ImageProcessingJobs processor = new ImageProcessingJobs(); string shuffle = processor.CreateShuffle(shuffleId); BlobAttribute attribute = new BlobAttribute("shuffle" + shuffleId + @"/shuffle.jpg", FileAccess.Write); Stream shuffleBlob = binder.Bind <Stream>(attribute); using (Stream localShuffle = File.OpenRead(shuffle)) { localShuffle.CopyTo(shuffleBlob); } }