Example #1
0
 public ImageCompressor(ImageCompressorSettings settings)
 {
     this.ImageEndpoints = settings.ImageEndpoints;
     this.FreeJobs = settings.MaxParallelJobs;
     this.MaxJobs = settings.MaxParallelJobs;
     this.UploadBatches = new Queue<IEnumerable<String>>(
         this.ImageEndpoints.Keys
             .Select((v, i) => new { v = v, g = i / settings.MaxFilesPerJob })
             .GroupBy(x => x.g)
             .Select(g => g.Select(x => x.v)));
 }
Example #2
0
 public ImageCompressor(ImageCompressorSettings settings)
 {
     this.ImageEndpoints = settings.ImageEndpoints;
     this.FreeJobs       = settings.MaxParallelJobs;
     this.MaxJobs        = settings.MaxParallelJobs;
     this.UploadBatches  = new Queue <IEnumerable <String> >(
         this.ImageEndpoints.Keys
         .Select((v, i) => new { v = v, g = i / settings.MaxFilesPerJob })
         .GroupBy(x => x.g)
         .Select(g => g.Select(x => x.v)));
 }