示例#1
0
        public static bool HasUXAttrib(XElement elm, UxAttribute attrib)
        {
            var name = attrib.ToString();
            var attr = elm.Attributes().FirstOrDefault(x => x.Name.NamespaceName == Configuration.UXNamespace && x.Name.LocalName == name);

            return(attr != null);
        }
示例#2
0
        string GetUXAttrib(XElement elm, UxAttribute attrib, string defaultValue)
        {
            var name = attrib.ToString();
            var attr = Attributes.TryGetUXAttrib(elm, attrib);

            if (attr != null)
            {
                VisitedUXAttribs.Add(attr);
                return(attr.Value);
            }
            else
            {
                return(defaultValue);
            }
        }
示例#3
0
        public static XAttribute TryGetUXAttrib(XElement elm, UxAttribute attrib)
        {
            var name = attrib.ToString();

            return(elm.Attributes().FirstOrDefault(x => x.Name.NamespaceName == Configuration.UXNamespace && x.Name.LocalName == name));
        }