예제 #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));
 }