Пример #1
0
        private static ImageWraper AppendParameterToUrl(ImageWraper wraper, string parameter)
        {
            var urlParamsSpliter = wraper.Url.Contains("?") ? "&" : "?";

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