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); }
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); } }
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)); }