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

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