Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }