Beispiel #1
0
        public XamlType GetByPrefix(string prefix, string typeName)
        {
            var ns = xamlNamespaceRegistry.GetNamespaceByPrefix(prefix);

            if (ns == null)
            {
                throw new XamlParseException($"Cannot find a namespace with the prefix \"{prefix}\"");
            }

            var type = ns.Get(typeName);

            if (type == null)
            {
                throw new XamlParseException($"The type \"{{{prefix}:{typeName}}} cannot be found\"");
            }

            return(GetXamlType(type));
        }
Beispiel #2
0
 public Namespace GetNamespaceByPrefix(string prefix)
 {
     return(nsRegistry.GetNamespaceByPrefix(prefix));
 }