Пример #1
0
        public static string GetRenderUrl(Fredin.Comic.Data.Comic comic, RenderMode render)
        {
            BlobConfigSection storage = ComicConfigSectionGroup.Blob;

            string directory;

            switch (render)
            {
            case RenderMode.Comic:
            default:
                directory = storage.ComicDirectory;
                break;

            case RenderMode.Frame:
                directory = storage.FrameDirectory;
                break;

            case RenderMode.Thumb:
                directory = storage.ThumbDirectory;
                break;

            case RenderMode.FrameThumb:
                directory = storage.FrameThumbDirectory;
                break;
            }

            string url       = String.Format("{0}{1}", directory, comic.StorageKey);
            Uri    renderUri = new Uri(new Uri(ComicConfigSectionGroup.Web.RenderBaseUrl), url);

            return(renderUri.AbsoluteUri);
        }
Пример #2
0
        public static string GetProfileRenderUrl(string storageKey)
        {
            BlobConfigSection storage = ComicConfigSectionGroup.Blob;
            string            url     = String.Format("{0}{1}", storage.ProfileDirectory, storageKey);
            Uri renderUri             = new Uri(new Uri(ComicConfigSectionGroup.Web.RenderBaseUrl), url);

            return(renderUri.AbsoluteUri);
        }
Пример #3
0
        public static string GetPhotoUrl(Fredin.Comic.Data.Photo photo)
        {
            BlobConfigSection storage = ComicConfigSectionGroup.Blob;
            string            url     = String.Format("{0}{1}", storage.PhotoDirectory, photo.StorageKey);
            Uri renderUri             = new Uri(new Uri(ComicConfigSectionGroup.Web.RenderBaseUrl), url);

            return(renderUri.AbsoluteUri);
        }