Esempio n. 1
0
        public XamlType GetWithFullAddress(XamlTypeName xamlTypeName)
        {
            var ns = xamlNamespaceRegistry.GetNamespace(xamlTypeName.Namespace);

            if (ns == null)
            {
                throw new TypeNotFoundException($"Error trying to resolve a XamlType: Cannot find the namespace '{xamlTypeName.Namespace}'");
            }

            var correspondingType = ns.Get(xamlTypeName.Name);

            if (correspondingType != null)
            {
                return(GetXamlType(correspondingType));
            }

            throw new TypeNotFoundException($"Error trying to resolve a XamlType: The type {xamlTypeName.Name} has not been found into the namespace '{xamlTypeName.Namespace}'");
        }
Esempio n. 2
0
 public Namespace GetNamespace(string name)
 {
     return(nsRegistry.GetNamespace(name));
 }