public HtmlAttributes(IEnumerable<KeyValuePair<string, object>> htmlAttributes) { if (htmlAttributes == null) return; _attributes = htmlAttributes.ToDictionary(x => x.Key, x => new HtmlAttribute(x.Value)); }