private static ImageWraper AppendParameterToUrl(ImageWraper wraper, string parameter) { var urlParamsSpliter = wraper.Url.Contains("?") ? "&" : "?"; wraper.Url = wraper.Url + urlParamsSpliter + parameter; return(wraper); }
public static ImageWraper WithCustomAlias(this ImageWraper wraper, string alias) { wraper.Alias = alias; return(wraper); }
public static ImageWraper WithCrop(this ImageWraper wraper) { return(AppendParameterToUrl(wraper, "mode=crop")); }
public static ImageWraper WithWidthRatio(this ImageWraper wraper, double widthratio) { return(AppendParameterToUrl(wraper, "widthratio=" + widthratio)); }
public static ImageWraper WithWidth(this ImageWraper wraper, int width) { return(AppendParameterToUrl(wraper, "width=" + width)); }
public static ImageWraper WithHeight(this ImageWraper wraper, int height) { return(AppendParameterToUrl(wraper, "height=" + height)); }
public static ImageWraper WithQuality(this ImageWraper wraper, int quality) { return(AppendParameterToUrl(wraper, "quality=" + quality)); }