Example #1
0
 public string this[XmlNodeName attrName]
 {
     get
     {
         var attr = this.Attributes.FirstOrDefault(a => a.Name == attrName);
         return(attr == null ? null : attr.Value);
     }
 }
Example #2
0
        public XmlAttribute(XmlNodeName name, string value)
        {
            if (!SecurityElement.IsValidAttributeValue(value))
            {
                throw new ArgumentException();
            }

            this.Name  = name;
            this.Value = value;
        }
Example #3
0
        public XmlElement(XmlNodeName name, XmlAttribute[] attrs = null, params IXmlElementItem[] childs)
            : base(name)
        {
            if (attrs.GroupBy(a => a.Name).Any(ag => ag.Count() > 1))
            {
                throw new ArgumentException();
            }

            this.Attributes = new ReadOnlyCollection <XmlAttribute>(attrs == null ? new XmlAttribute[0] : attrs);
            this.Childs     = new ReadOnlyCollection <IXmlElementItem>(childs == null ? new IXmlElementItem[0] : childs);
        }
Example #4
0
 public XmlElement(XmlNodeName name, params XmlAttribute[] attrs)
     : this(name, attrs, new IXmlElementItem[0])
 {
 }
Example #5
0
 internal XmlNamedNode(XmlNodeName name)
 {
     this.Name = name;
 }
        public static string GetPropertyValue(this ProjectFileModel projectFile, XmlNodeName propertyName)
        {
            var value = projectFile.GetPropertyValue(propertyName.Value);

            return(value);
        }
 public static void SetPropertyValue(this ProjectFileModel projectFile, XmlNodeName propertyName, string value)
 {
     projectFile.SetPropertyValue(propertyName.Value, value);
 }
        public static bool HasProperty(this ProjectFileModel projectFile, XmlNodeName propertyName)
        {
            var output = projectFile.HasProperty(propertyName.Value);

            return(output);
        }
Example #9
0
        public static XmlNodeName AsXmlNodeName(this string value)
        {
            var xmlNodeName = new XmlNodeName(value);

            return(xmlNodeName);
        }