예제 #1
0
        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);
        }
예제 #2
0
 protected XElement()
 {
     attributes = new XAttributeCollection(this);
 }
예제 #3
0
 public XElement(DocumentLocation start) : base(start)
 {
     attributes = new XAttributeCollection(this);
 }
예제 #4
0
        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));
        }
예제 #5
0
 public XElement(int startOffset) : base(startOffset)
 {
     Attributes = new XAttributeCollection(this);
 }