public static Dictionary <string, string> ToDictionary(this XAttributeCollection attributes, StringComparer comparer) { var dict = new Dictionary <string, string> (comparer); foreach (XAttribute a in attributes) { dict[a.Name.FullName] = a.Value ?? string.Empty; } return(dict); }
protected XElement() { attributes = new XAttributeCollection(this); }
public XElement(DocumentLocation start) : base(start) { attributes = new XAttributeCollection(this); }
public static bool IsTrue(this XAttributeCollection attributes, string name) { var att = attributes.Get(name, true); return(att != null && string.Equals(att.Value, "true", StringComparison.OrdinalIgnoreCase)); }
public XElement(int startOffset) : base(startOffset) { Attributes = new XAttributeCollection(this); }