Exemple #1
0
        private void UpdateLogEntryToOptimized(Identity logEntryId)
        {
            ImageLogEntry logEntry = this._imageLogRepository.GetLogEntry(logEntryId);

            logEntry.IsOptimized = true;

            this._imageLogRepository.Save(logEntry);
        }
Exemple #2
0
        private Identity AddLogEntry(ImageOptimizationResponse imageOptimizationResponse, ImageData imageData)
        {
            ImageLogEntry logEntry = this._imageLogRepository.GetLogEntry(imageOptimizationResponse.OriginalImageUrl) ?? new ImageLogEntry();

            logEntry.ContentGuid   = imageData.ContentGuid;
            logEntry.OriginalSize  = imageOptimizationResponse.OriginalImageSize;
            logEntry.OptimizedSize = imageOptimizationResponse.OptimizedImageSize;
            logEntry.PercentSaved  = imageOptimizationResponse.PercentSaved;
            logEntry.ImageUrl      = imageOptimizationResponse.OriginalImageUrl;

            return(this._imageLogRepository.Save(logEntry));
        }
Exemple #3
0
        public Identity Save(ImageLogEntry imageLogEntry)
        {
            imageLogEntry.Modified = DateTime.Now;

            if (imageLogEntry.Id != null)
            {
                return(Store.Save(imageLogEntry, imageLogEntry.Id));
            }
            else
            {
                return(Store.Save(imageLogEntry));
            }
        }