public XamlType GetByPrefix(string prefix, string typeName) { var ns = namespaceRegistry.GetNamespaceByPrefix(prefix); if (ns == null) { throw new ParseException($"Cannot find a namespace with the prefix \"{prefix}\""); } var type = ns.Get(typeName); if (type == null) { throw new ParseException($"The type \"{{{prefix}:{typeName}}} cannot be found\""); } return(GetByType(type)); }
public Namespace GetNamespaceByPrefix(string prefix) { return(NamespaceRegistry.GetNamespaceByPrefix(prefix)); }