Пример #1
0
        public static VocaDbUrl GetUrl(this IEntryImageUrlFactory persister, IEntryImageInformation picture, ImageSize size, bool checkExists)
        {
            if (checkExists && !persister.HasImage(picture, size))
            {
                return(VocaDbUrl.Empty);
            }

            return(persister.GetUrl(picture, size));
        }
Пример #2
0
        public static VocaDbUrl GetUrlWithFallback(this IEntryImageUrlFactory urlFactory, IEntryImageInformation imageInfo, ImageSize size, VocaDbUrl fallbackUrl)
        {
            if (imageInfo == null || !imageInfo.ShouldExist() || !urlFactory.HasImage(imageInfo, size))
            {
                return(fallbackUrl);
            }

            return(urlFactory.GetUrl(imageInfo, size));
        }
Пример #3
0
 public static string GetUrlAbsolute(this IEntryImageUrlFactory persister, IEntryImageInformation picture, ImageSize size, bool checkExists = false)
 {
     return(persister.GetUrl(picture, size, checkExists).ToAbsolute().Url);
 }