public global::Windows.UI.Xaml.Markup.IXamlType GetXamlTypeByName(string typeName)
{
if (string.IsNullOrEmpty(typeName))
{
return null;
}
global::Windows.UI.Xaml.Markup.IXamlType xamlType;
if (_xamlTypeCacheByName.TryGetValue(typeName, out xamlType))
{
return xamlType;
}
int typeIndex = LookupTypeIndexByName(typeName);
if(typeIndex != -1)
{
xamlType = CreateXamlType(typeIndex);
}
if (xamlType != null)
{
_xamlTypeCacheByName.Add(xamlType.FullName, xamlType);
_xamlTypeCacheByType.Add(xamlType.UnderlyingType, xamlType);
}
return xamlType;
}