Esempio n. 1
0
        private static ImageWraper AppendParameterToUrl(ImageWraper wraper, string parameter)
        {
            var urlParamsSpliter = wraper.Url.Contains("?") ? "&" : "?";

            wraper.Url = wraper.Url + urlParamsSpliter + parameter;
            return(wraper);
        }
Esempio n. 2
0
 public static ImageWraper WithCustomAlias(this ImageWraper wraper, string alias)
 {
     wraper.Alias = alias;
     return(wraper);
 }
Esempio n. 3
0
 public static ImageWraper WithCrop(this ImageWraper wraper)
 {
     return(AppendParameterToUrl(wraper, "mode=crop"));
 }
Esempio n. 4
0
 public static ImageWraper WithWidthRatio(this ImageWraper wraper, double widthratio)
 {
     return(AppendParameterToUrl(wraper, "widthratio=" + widthratio));
 }
Esempio n. 5
0
 public static ImageWraper WithWidth(this ImageWraper wraper, int width)
 {
     return(AppendParameterToUrl(wraper, "width=" + width));
 }
Esempio n. 6
0
 public static ImageWraper WithHeight(this ImageWraper wraper, int height)
 {
     return(AppendParameterToUrl(wraper, "height=" + height));
 }
Esempio n. 7
0
 public static ImageWraper WithQuality(this ImageWraper wraper, int quality)
 {
     return(AppendParameterToUrl(wraper, "quality=" + quality));
 }