private static void AddClass(LinkInline link, string cssClass) { HtmlAttributes attributes = link.GetAttributes(); if (!attributes.Classes.Any(x => x == cssClass)) { attributes.Classes.Add(cssClass); link.SetAttributes(attributes); } }
private static void AddAttribute(LinkInline link, string name, string value) { HtmlAttributes attributes = link.GetAttributes(); if (!attributes.Properties.Any(x => x.Key == name)) { attributes.AddPropertyIfNotExist(name, value); link.SetAttributes(attributes); } }