protected internal virtual XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) { if (xamlNamespace == null) { throw new ArgumentNullException("xamlNamespace"); } if (name == null) { throw new ArgumentNullException("name"); } if (typeArguments != null) { foreach (XamlType type in typeArguments) { if (type == null) { throw new ArgumentException(System.Xaml.SR.Get("CollectionCannotContainNulls", new object[] { "typeArguments" })); } if (type.UnderlyingType == null) { return(null); } } } XamlType xamlType = null; if ((typeArguments == null) || (typeArguments.Length == 0)) { xamlType = XamlLanguage.LookupXamlType(xamlNamespace, name); if (xamlType != null) { if (this.FullyQualifyAssemblyNamesInClrNamespaces) { xamlType = this.GetXamlType(xamlType.UnderlyingType); } return(xamlType); } } XamlNamespace namespace2 = this.GetXamlNamespace(xamlNamespace); int revisionNumber = namespace2.RevisionNumber; xamlType = namespace2.GetXamlType(name, typeArguments); if ((xamlType == null) && !namespace2.IsClrNamespace) { this.UpdateXmlNsInfo(); if (namespace2.RevisionNumber > revisionNumber) { xamlType = namespace2.GetXamlType(name, typeArguments); } } return(xamlType); }
public virtual XamlDirective GetXamlDirective(string xamlNamespace, string name) { if (xamlNamespace == null) { throw new ArgumentNullException("xamlNamespace"); } if (name == null) { throw new ArgumentNullException("name"); } if (XamlLanguage.XamlNamespaces.Contains(xamlNamespace)) { return(XamlLanguage.LookupXamlDirective(name)); } if (XamlLanguage.XmlNamespaces.Contains(xamlNamespace)) { return(XamlLanguage.LookupXmlDirective(name)); } return(null); }
public virtual XamlType GetXamlType(Type type) { return(this.GetXamlType(type, XamlLanguage.TypeAlias(type))); }
private static bool IsDirective(XName name) { return(XamlLanguage.NamespaceName == name.NamespaceName && XamlLanguage.IsDirective(new XamlName(name.LocalName, name.NamespaceName))); }
private static bool IsDirective(XmlElement element) { return(XamlLanguage.NamespaceName == element.NamespaceURI && XamlLanguage.IsDirective(new XamlName(element.LocalName, element.NamespaceURI))); }
private static bool IsDirective(XmlAttribute attribute) { return(XamlLanguage.NamespaceName == attribute.NamespaceURI && XamlLanguage.IsDirective(new XamlName(attribute.LocalName, attribute.NamespaceURI))); }