string GetPrefix() { if (!IsInteractive) { return(string.Empty); } XElement e = source as XElement; if (e != null) { string prefix = e.GetPrefixOfNamespace(e.Name.Namespace); if (prefix != null) { return(prefix); } return(string.Empty); } XAttribute a = source as XAttribute; if (a != null) { string prefix = a.GetPrefixOfNamespace(a.Name.Namespace); if (prefix != null) { return(prefix); } } return(string.Empty); }
private string GetPrefix() { if (this.IsInteractive) { XElement source = this.source as XElement; if (source != null) { string prefixOfNamespace = source.GetPrefixOfNamespace(source.Name.Namespace); if (prefixOfNamespace != null) { return(prefixOfNamespace); } return(string.Empty); } XAttribute attribute = this.source as XAttribute; if (attribute != null) { string str2 = attribute.GetPrefixOfNamespace(attribute.Name.Namespace); if (str2 != null) { return(str2); } } } return(string.Empty); }