From 6a5bf9cc780c6cd878be4c5111d64226208f0597 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Fri, 22 Feb 2013 19:44:20 -0500 Subject: extracted more interfaces --- .../Providers/BaseImageEnhancer.cs | 99 ---------------------- 1 file changed, 99 deletions(-) delete mode 100644 MediaBrowser.Controller/Providers/BaseImageEnhancer.cs (limited to 'MediaBrowser.Controller/Providers/BaseImageEnhancer.cs') diff --git a/MediaBrowser.Controller/Providers/BaseImageEnhancer.cs b/MediaBrowser.Controller/Providers/BaseImageEnhancer.cs deleted file mode 100644 index aeceeaf5fc..0000000000 --- a/MediaBrowser.Controller/Providers/BaseImageEnhancer.cs +++ /dev/null @@ -1,99 +0,0 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Model.Drawing; -using MediaBrowser.Model.Entities; -using System; -using System.Drawing; -using System.Threading.Tasks; - -namespace MediaBrowser.Controller.Providers -{ - /// - /// Class BaseImageEnhancer - /// - public abstract class BaseImageEnhancer : IDisposable - { - /// - /// Return true only if the given image for the given item will be enhanced by this enhancer. - /// - /// The item. - /// Type of the image. - /// true if this enhancer will enhance the supplied image for the supplied item, false otherwise - public abstract bool Supports(BaseItem item, ImageType imageType); - - /// - /// Gets the priority or order in which this enhancer should be run. - /// - /// The priority. - public abstract MetadataProviderPriority Priority { get; } - - /// - /// Return the date of the last configuration change affecting the provided baseitem and image type - /// - /// The item. - /// Type of the image. - /// Date of last config change - public virtual DateTime LastConfigurationChange(BaseItem item, ImageType imageType) - { - return DateTime.MinValue; - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Releases unmanaged and - optionally - managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - protected virtual void Dispose(bool dispose) - { - } - - /// - /// Gets the size of the enhanced image. - /// - /// The item. - /// Type of the image. - /// Index of the image. - /// Size of the original image. - /// ImageSize. - public virtual ImageSize GetEnhancedImageSize(BaseItem item, ImageType imageType, int imageIndex, ImageSize originalImageSize) - { - return originalImageSize; - } - - /// - /// Enhances the supplied image and returns it - /// - /// The item. - /// The original image. - /// Type of the image. - /// Index of the image. - /// Task{System.Drawing.Image}. - protected abstract Task EnhanceImageAsyncInternal(BaseItem item, Image originalImage, ImageType imageType, int imageIndex); - - /// - /// Enhances the image async. - /// - /// The item. - /// The original image. - /// Type of the image. - /// Index of the image. - /// Task{Image}. - /// - public Task EnhanceImageAsync(BaseItem item, Image originalImage, ImageType imageType, int imageIndex) - { - if (item == null || originalImage == null) - { - throw new ArgumentNullException(); - } - - return EnhanceImageAsyncInternal(item, originalImage, imageType, imageIndex); - } - } -} -- cgit v1.2.3