private static string RenderImageWithAltMacro(string input, FloatAlignment alignment, Func <string, string> encode) { string format = ImageNoLinkAndAlt; ImagePart parts = Utility.ExtractImageParts(input, ImagePartExtras.ContainsText); return(string.Format(format, alignment.GetStyle(), alignment.GetPadding(), encode(parts.ImageUrl), encode(parts.Text), parts.Dimensions)); }
private static string RenderImageNoLinkMacro(string input, FloatAlignment alignment, Func <string, string> encode) { string format = alignment == FloatAlignment.None ? ImageNoLink : ImageNoLinkWithStyle; ImagePart parts = Utility.ExtractImageParts(input, ImagePartExtras.None); return(string.Format(format, alignment.GetStyle(), alignment.GetPadding(), encode(parts.ImageUrl), parts.Dimensions)); }
private static string RenderImageDataWithLinkAndAltMacro(string input, FloatAlignment alignment, Func <string, string> encode) { string format = alignment == FloatAlignment.None ? ImageLinkAndAlt : ImageLinkAndAltWithStyle; ImagePart parts = Utility.ExtractImageParts(input, ImagePartExtras.ContainsLink | ImagePartExtras.ContainsText | ImagePartExtras.ContainsData, false); return(string.Format(format, alignment.GetStyle(), alignment.GetPadding(), encode(parts.LinkUrl), encode(parts.ImageUrl), encode(parts.Text), parts.Dimensions)); }
private static string RenderImageWithAltMacro(string input, FloatAlignment alignment, Func<string, string> encode) { string format = ImageNoLinkAndAlt; ImagePart parts = Utility.ExtractImageParts(input, ImagePartExtras.ContainsText); return string.Format(format, alignment.GetStyle(), alignment.GetPadding(), encode(parts.ImageUrl), encode(parts.Text), parts.Dimensions); }
private static string RenderImageWithLinkMacro(string input, FloatAlignment alignment, Func<string, string> encode) { string format = alignment == FloatAlignment.None ? ImageAndLink : ImageAndLinkWithStyle; ImagePart parts = Utility.ExtractImageParts(input, ImagePartExtras.ContainsLink); return string.Format(format, alignment.GetStyle(), alignment.GetPadding(), encode(parts.LinkUrl), encode(parts.ImageUrl), parts.Dimensions); }