示例#1
0
 public global::Microsoft.UI.Xaml.Markup.IXamlType GetXamlTypeByType(global::System.Type type)
 {
     global::Microsoft.UI.Xaml.Markup.IXamlType xamlType;
     lock (_xamlTypeCacheByType)
     {
         if (_xamlTypeCacheByType.TryGetValue(type, out xamlType))
         {
             return(xamlType);
         }
         int typeIndex = LookupTypeIndexByType(type);
         if (typeIndex != -1)
         {
             xamlType = CreateXamlType(typeIndex);
         }
         var userXamlType = xamlType as global::EmployeeManager.WinUI.EmployeeManager_WinUI_XamlTypeInfo.XamlUserType;
         if (xamlType == null || (userXamlType != null && userXamlType.IsReturnTypeStub && !userXamlType.IsLocalType))
         {
             global::Microsoft.UI.Xaml.Markup.IXamlType libXamlType = CheckOtherMetadataProvidersForType(type);
             if (libXamlType != null)
             {
                 if (libXamlType.IsConstructible || xamlType == null)
                 {
                     xamlType = libXamlType;
                 }
             }
         }
         if (xamlType != null)
         {
             _xamlTypeCacheByName.Add(xamlType.FullName, xamlType);
             _xamlTypeCacheByType.Add(xamlType.UnderlyingType, xamlType);
         }
     }
     return(xamlType);
 }
示例#2
0
 private global::Microsoft.UI.Xaml.Markup.IXamlType CheckOtherMetadataProvidersForType(global::System.Type type)
 {
     global::Microsoft.UI.Xaml.Markup.IXamlType xamlType      = null;
     global::Microsoft.UI.Xaml.Markup.IXamlType foundXamlType = null;
     foreach (global::Microsoft.UI.Xaml.Markup.IXamlMetadataProvider xmp in OtherProviders)
     {
         xamlType = xmp.GetXamlType(type);
         if (xamlType != null)
         {
             if (xamlType.IsConstructible)    // not Constructible means it might be a Return Type Stub
             {
                 return(xamlType);
             }
             foundXamlType = xamlType;
         }
     }
     return(foundXamlType);
 }
示例#3
0
 public global::Microsoft.UI.Xaml.Markup.IXamlType GetXamlTypeByName(string typeName)
 {
     if (string.IsNullOrEmpty(typeName))
     {
         return(null);
     }
     global::Microsoft.UI.Xaml.Markup.IXamlType xamlType;
     lock (_xamlTypeCacheByType)
     {
         if (_xamlTypeCacheByName.TryGetValue(typeName, out xamlType))
         {
             return(xamlType);
         }
         int typeIndex = LookupTypeIndexByName(typeName);
         if (typeIndex != -1)
         {
             xamlType = CreateXamlType(typeIndex);
         }
         var userXamlType = xamlType as global::BasicLinkedList.BasicLinkedList_XamlTypeInfo.XamlUserType;
         if (xamlType == null || (userXamlType != null && userXamlType.IsReturnTypeStub && !userXamlType.IsLocalType))
         {
             global::Microsoft.UI.Xaml.Markup.IXamlType libXamlType = CheckOtherMetadataProvidersForName(typeName);
             if (libXamlType != null)
             {
                 if (libXamlType.IsConstructible || xamlType == null)
                 {
                     xamlType = libXamlType;
                 }
             }
         }
         if (xamlType != null)
         {
             _xamlTypeCacheByName.Add(xamlType.FullName, xamlType);
             _xamlTypeCacheByType.Add(xamlType.UnderlyingType, xamlType);
         }
     }
     return(xamlType);
 }
示例#4
0
 public void SetBoxedType(global::Microsoft.UI.Xaml.Markup.IXamlType boxedType)
 {
     _boxedType = boxedType;
 }
示例#5
0
 public XamlUserType(global::EmployeeManager.WinUI.EmployeeManager_WinUI_XamlTypeInfo.XamlTypeInfoProvider provider, string fullName, global::System.Type fullType, global::Microsoft.UI.Xaml.Markup.IXamlType baseType)
     : base(fullName, fullType)
 {
     _provider = provider;
     _baseType = baseType;
 }
示例#6
0
 public XamlUserType(global::BasicLinkedList.BasicLinkedList_XamlTypeInfo.XamlTypeInfoProvider provider, string fullName, global::System.Type fullType, global::Microsoft.UI.Xaml.Markup.IXamlType baseType)
     : base(fullName, fullType)
 {
     _provider = provider;
     _baseType = baseType;
 }
示例#7
0
 public XamlUserType(global::SACOMaintenance.UI.SACOMaintenance_UI_XamlTypeInfo.XamlTypeInfoProvider provider, string fullName, global::System.Type fullType, global::Microsoft.UI.Xaml.Markup.IXamlType baseType)
     : base(fullName, fullType)
 {
     _provider = provider;
     _baseType = baseType;
 }