Exemple #1
0
 /// <summary>
 /// Gets the current image path.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <param name="type">The type.</param>
 /// <param name="imageIndex">Index of the image.</param>
 /// <returns>System.String.</returns>
 /// <exception cref="System.ArgumentNullException">
 /// imageIndex
 /// or
 /// imageIndex
 /// </exception>
 private string GetCurrentImagePath(IHasImages item, ImageType type, int imageIndex)
 {
     return(item.GetImagePath(type, imageIndex));
 }
Exemple #2
0
 /// <summary>
 /// Gets the current image path.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <param name="type">The type.</param>
 /// <param name="imageIndex">Index of the image.</param>
 /// <returns>System.String.</returns>
 /// <exception cref="System.ArgumentNullException">
 /// imageIndex
 /// or
 /// imageIndex
 /// </exception>
 private string GetCurrentImagePath(IHasImages item, ImageType type, int imageIndex)
 {
     return item.GetImagePath(type, imageIndex);
 }
Exemple #3
0
 /// <summary>
 /// Gets the image path.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <param name="imageType">Type of the image.</param>
 /// <returns>System.String.</returns>
 public static string GetImagePath(this IHasImages item, ImageType imageType)
 {
     return(item.GetImagePath(imageType, 0));
 }
        /// <summary>
        /// Gets the enhanced image.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="imageType">Type of the image.</param>
        /// <param name="imageIndex">Index of the image.</param>
        /// <returns>Task{System.String}.</returns>
        public async Task<string> GetEnhancedImage(IHasImages item, ImageType imageType, int imageIndex)
        {
            var enhancers = GetSupportedEnhancers(item, imageType).ToList();

            var imagePath = item.GetImagePath(imageType, imageIndex);

            var dateModified = item.GetImageDateModified(imagePath);

            var result = await GetEnhancedImage(imagePath, dateModified, item, imageType, imageIndex, enhancers);

            return result.Item1;
        }