Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public Namespace GetNamespaceByPrefix(string prefix)
 {
     return(NamespaceRegistry.GetNamespaceByPrefix(prefix));
 }