public static async Task <string> RenderAsync(SvgTagHelperConfiguration config, string iconName, string classes)
        {
            var svg = new SvgTagHelper(config)
            {
                Name = iconName
            };

            TagHelperAttributeList attributes = null;

            if (!string.IsNullOrEmpty(classes))
            {
                attributes = new TagHelperAttributeList();
                attributes.SetAttribute("class", classes);
            }

            var content = await svg.RenderTagHelperAsync(attributes);

            return(content);
        }
 public ModalTagHelper(SvgTagHelperConfiguration config)
 {
     _config = config;
 }
 public static void AddSvgTagHelper(this IServiceCollection services, SvgTagHelperConfiguration config)
 {
     services.AddSingleton(config);
 }
 // TODO document, this should probably be configured via DI
 public SvgTagHelper(SvgTagHelperConfiguration config) : base()
 {
     _config = config;
 }
 public AvatarTagHelper(SvgTagHelperConfiguration config)
 {
     _config = config;
 }
Beispiel #6
0
 public BreadcrumbsTagHelper(SvgTagHelperConfiguration config)
 {
     _config = config;
 }