public string GetThumbnailUrlForUpdate(string Url, BookmarkingThumbnailSize size)
        {
            var url = GetThumbnailUrl(Url, size);
            try
            {
                var req = WebRequest.Create(url);
                using (var resp = (HttpWebResponse)req.GetResponse())
                {
                    if (resp.StatusCode == HttpStatusCode.OK)
                    {
                        return url;
                    }
                }
            }
            catch (Exception)
            {

            }
            return null;
        }
 private static string GetFileNameByUrl(string url, BookmarkingThumbnailSize size)
 {
     string sizeString = size == null ? string.Empty : size.ToString();
     return string.Format("{0}{1}.{2}", GetSHA256(url), sizeString, BookmarkingSettings.CaptureImageFormat.ToString());
 }
 public string GetThumbnailUrlForUpdate(string Url, BookmarkingThumbnailSize size)
 {
     return GetThumbnailUrl(Url, size);
 }
        public string GetThumbnailUrl(string Url, BookmarkingThumbnailSize size)
        {
            var fileName = GetFileNameByUrl(Url, size);

            return getStore(HttpContext.Current).IsFile(string.Empty, fileName) ? getStore(HttpContext.Current).GetUri(string.Empty, fileName).ToString() : string.Empty;
        }
 public string GetThumbnailUrl(string Url, BookmarkingThumbnailSize size)
 {
     var sizeValue = string.Format("{0}x{1}", size.Width, size.Height);
     return string.Format(ServiceFormatUrl, Url, sizeValue, Url.GetHashCode());
 }
예제 #6
0
		private string GetThumbnailUrl(BookmarkingThumbnailSize size)
		{
			return BookmarkingServiceHelper.GetThumbnailUrl(URL, size);
		}