internal static XName GetXName(this IKnownType self, string name, XNamespace overridingNamespace) { if (overridingNamespace.IsEmpty()) { return(XName.Get(name, overridingNamespace.NamespaceName)); } return(XName.Get(name)); }
public static XName OverrideNsIfEmpty(this XName self, XNamespace ns) { if (self.Namespace.IsEmpty()) { return(self); } if (ns.IsEmpty()) { return(ns + self.LocalName); } return(self); }
public static XNamespace IfEmptyThen(this XNamespace self, XNamespace next) { return(self.IsEmpty() ? self : next); }