From f3bf8115a383a0fdf53297ef63ef1b2dcf1cc81c Mon Sep 17 00:00:00 2001 From: Alexander Sklar Date: Tue, 26 Apr 2022 01:35:17 -0700 Subject: [PATCH 1/5] Use hashed string values for type creator lookup --- .../Codegen/Properties/launchSettings.json | 2 +- package/Codegen/TypeCreator.cs | 91 ++--- package/Codegen/TypeCreator.tt | 33 +- package/Codegen/Util.cs | 10 + .../ReactNativeXaml/Codegen/TypeCreator.g.cpp | 361 +++++++++--------- .../windows/ReactNativeXaml/XamlMetadata.cpp | 4 +- .../ReactNativeXaml/XamlViewManager.cpp | 4 + 7 files changed, 280 insertions(+), 225 deletions(-) diff --git a/package/Codegen/Properties/launchSettings.json b/package/Codegen/Properties/launchSettings.json index 96e357dc..2844f743 100644 --- a/package/Codegen/Properties/launchSettings.json +++ b/package/Codegen/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Codegen": { "commandName": "Project", - "commandLineArgs": "-verbose -winmd ..\\..\\..\\..\\..\\example\\windows\\packages\\Microsoft.UI.Xaml.2.6.0\\lib\\uap10.0\\Microsoft.UI.Xaml.winmd" + "commandLineArgs": "-verbose -winmd ..\\..\\..\\..\\..\\examplenuget\\windows\\packages\\Microsoft.UI.Xaml.2.6.0\\lib\\uap10.0\\Microsoft.UI.Xaml.winmd" } } } \ No newline at end of file diff --git a/package/Codegen/TypeCreator.cs b/package/Codegen/TypeCreator.cs index a300ef91..76896b4b 100644 --- a/package/Codegen/TypeCreator.cs +++ b/package/Codegen/TypeCreator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 16.0.0.0 +// Runtime Version: 17.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -18,8 +18,8 @@ namespace Codegen /// Class to produce the template output /// - #line 1 "F:\react-native-xaml\package\Codegen\TypeCreator.tt" - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] + #line 1 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] public partial class TypeCreator : TypeCreatorBase { #line hidden @@ -31,80 +31,85 @@ public virtual string TransformText() this.Write("#include \"pch.h\"\r\n#include \"XamlMetadata.h\"\r\n#include \"Crc32Str.h\"\r\n#include \r\n\r\n"); - #line 11 "F:\react-native-xaml\package\Codegen\TypeCreator.tt" + #line 11 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" foreach (var ns in Types.Select(x => x.GetNamespace()).Distinct()) { #line default #line hidden this.Write("#include \"winrt/"); - #line 12 "F:\react-native-xaml\package\Codegen\TypeCreator.tt" + #line 12 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(ns)); #line default #line hidden this.Write(".h\"\r\n"); - #line 13 "F:\react-native-xaml\package\Codegen\TypeCreator.tt" + #line 13 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" } #line default #line hidden - this.Write(@" -/************************************************************* -THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT MODIFY MANUALLY -**************************************************************/ - -winrt::Windows::Foundation::IInspectable XamlMetadata::Create(const std::string_view& typeName) const { - wchar_t buf[128]{}; - for (auto i = 0u; i < typeName.size() && i < ARRAYSIZE(buf) - 1; i++) { - buf[i] = static_cast(typeName[i]); - } - - HSTRING clsid = nullptr; - if (SUCCEEDED(WindowsCreateString(buf, static_cast(wcslen(buf)), &clsid))) { - winrt::com_ptr<::IInspectable> insp{ nullptr }; - if (SUCCEEDED(RoActivateInstance(clsid, insp.put()))) { - winrt::IUnknown unk{ nullptr }; - winrt::copy_from_abi(unk, insp.get()); - WindowsDeleteString(clsid); - return unk.as(); - } else { - // type probably has a custom activation factory, use C++/WinRT to create it - WindowsDeleteString(clsid); - clsid = nullptr; - const auto key = COMPILE_TIME_CRC32_STR(typeName.data()); - switch (key) { -"); + this.Write("\r\n/*************************************************************\r\nTHIS FILE WAS A" + + "UTOMATICALLY GENERATED, DO NOT MODIFY MANUALLY\r\n********************************" + + "******************************/\r\n\r\ntemplate\r\nc" + + "onst T* binary_search_map(const std::pair (& map)[N], size_t low, size_t h" + + "igh, const K& key) {\r\n while (low != high) {\r\n size_t midpoint = (low " + + "+ high) / 2;\r\n if (map[midpoint].first == key) return &(map[midpoint].sec" + + "ond);\r\n else if (((high - low) % 2 == 1) && map[midpoint + 1].first == ke" + + "y) return &(map[midpoint + 1].second);\r\n else if (key < map[midpoint].fir" + + "st) high = midpoint;\r\n else /*if (key > map[midpoint].first)*/ low = midp" + + "oint + 1;\r\n }\r\n if (map[low].first == key) return &(map[low].second);\r\n " + + " return nullptr;\r\n}\r\n\r\nwinrt::Windows::Foundation::IInspectable XamlMetadata::Cr" + + "eate(const std::string_view& typeName) const {\r\n wchar_t buf[128]{};\r\n for (au" + + "to i = 0u; i < typeName.size() && i < ARRAYSIZE(buf) - 1; i++) {\r\n buf[i] = s" + + "tatic_cast(typeName[i]);\r\n }\r\n\r\n HSTRING clsid = nullptr;\r\n if (SUCC" + + "EEDED(WindowsCreateString(buf, static_cast(wcslen(buf)), &clsid))) {\r\n " + + " winrt::com_ptr<::IInspectable> insp{ nullptr };\r\n if (SUCCEEDED(RoActivateI" + + "nstance(clsid, insp.put()))) {\r\n winrt::IUnknown unk{ nullptr };\r\n win" + + "rt::copy_from_abi(unk, insp.get());\r\n WindowsDeleteString(clsid);\r\n re" + + "turn unk.as();\r\n } else {\r\n // type probably has a " + + "custom activation factory, use C++/WinRT to create it\r\n WindowsDeleteString" + + "(clsid);\r\n clsid = nullptr;\r\n const auto key = COMPILE_TIME_CRC32_STR(" + + "typeName.data());\r\n const std::pair map[] = {\r\n"); - #line 39 "F:\react-native-xaml\package\Codegen\TypeCreator.tt" - foreach (var t in Types.Where(t => Util.GetComposableFactoryType(t) != null)) { + #line 52 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" + foreach (var t in Types.Where(t => Util.GetComposableFactoryType(t) != null).OrderBy(t => Util.GetCRC32(t.GetFullName()))) { #line default #line hidden - this.Write(" case COMPILE_TIME_CRC32_STR(\""); + this.Write(" { COMPILE_TIME_CRC32_STR(\""); - #line 40 "F:\react-native-xaml\package\Codegen\TypeCreator.tt" + #line 53 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(t.GetFullName())); #line default #line hidden - this.Write("\"): { return "); + this.Write("\"), []() -> winrt::Windows::Foundation::IInspectable { return "); - #line 40 "F:\react-native-xaml\package\Codegen\TypeCreator.tt" + #line 53 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Util.GetCppWinRTType(t))); #line default #line hidden - this.Write("(); }\r\n"); + this.Write("(); } }, // 0x"); - #line 41 "F:\react-native-xaml\package\Codegen\TypeCreator.tt" + #line 53 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(Util.GetCRC32(t.GetFullName()).ToString("X8"))); + + #line default + #line hidden + this.Write("\r\n"); + + #line 54 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" } #line default #line hidden - this.Write(" }\r\n }\r\n }\r\n assert(false && \"xaml type not found\");\r\n return nullptr;\r\n" + - "}\r\n\r\n\r\n"); + this.Write(" };\r\n\r\n if (const auto it = binary_search_map(map, 0, std::size(map), k" + + "ey)) {\r\n return (* it)();\r\n }\r\n }\r\n }\r\n assert(false && \"xaml t" + + "ype not found\");\r\n return nullptr;\r\n}\r\n\r\n\r\n"); return this.GenerationEnvironment.ToString(); } } @@ -115,7 +120,7 @@ public virtual string TransformText() /// /// Base class for this transformation /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] public class TypeCreatorBase { #region Fields diff --git a/package/Codegen/TypeCreator.tt b/package/Codegen/TypeCreator.tt index 454d9359..62d212b6 100644 --- a/package/Codegen/TypeCreator.tt +++ b/package/Codegen/TypeCreator.tt @@ -16,6 +16,19 @@ THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT MODIFY MANUALLY **************************************************************/ +template +const T* binary_search_map(const std::pair (& map)[N], size_t low, size_t high, const K& key) { + while (low != high) { + size_t midpoint = (low + high) / 2; + if (map[midpoint].first == key) return &(map[midpoint].second); + else if (((high - low) % 2 == 1) && map[midpoint + 1].first == key) return &(map[midpoint + 1].second); + else if (key < map[midpoint].first) high = midpoint; + else /*if (key > map[midpoint].first)*/ low = midpoint + 1; + } + if (map[low].first == key) return &(map[low].second); + return nullptr; +} + winrt::Windows::Foundation::IInspectable XamlMetadata::Create(const std::string_view& typeName) const { wchar_t buf[128]{}; for (auto i = 0u; i < typeName.size() && i < ARRAYSIZE(buf) - 1; i++) { @@ -31,15 +44,19 @@ winrt::Windows::Foundation::IInspectable XamlMetadata::Create(const std::string_ WindowsDeleteString(clsid); return unk.as(); } else { - // type probably has a custom activation factory, use C++/WinRT to create it - WindowsDeleteString(clsid); - clsid = nullptr; - const auto key = COMPILE_TIME_CRC32_STR(typeName.data()); - switch (key) { -<# foreach (var t in Types.Where(t => Util.GetComposableFactoryType(t) != null)) { #> - case COMPILE_TIME_CRC32_STR("<#= t.GetFullName() #>"): { return <#= Util.GetCppWinRTType(t) #>(); } + // type probably has a custom activation factory, use C++/WinRT to create it + WindowsDeleteString(clsid); + clsid = nullptr; + const auto key = COMPILE_TIME_CRC32_STR(typeName.data()); + const std::pair map[] = { +<# foreach (var t in Types.Where(t => Util.GetComposableFactoryType(t) != null).OrderBy(t => Util.GetCRC32(t.GetFullName()))) { #> + { COMPILE_TIME_CRC32_STR("<#= t.GetFullName() #>"), []() -> winrt::Windows::Foundation::IInspectable { return <#= Util.GetCppWinRTType(t) #>(); } }, // 0x<#= Util.GetCRC32(t.GetFullName()).ToString("X8") #> <# } #> - } + }; + + if (const auto it = binary_search_map(map, 0, std::size(map), key)) { + return (* it)(); + } } } assert(false && "xaml type not found"); diff --git a/package/Codegen/Util.cs b/package/Codegen/Util.cs index 14985ba2..262abaf9 100644 --- a/package/Codegen/Util.cs +++ b/package/Codegen/Util.cs @@ -643,6 +643,16 @@ public static string GetEventArgsMethodArgs(MrType argType, string methodName) return paramTypes; } + public static UInt32 GetCRC32(string input) + { + var crc32 = 5381u; + for (int i = input.Length - 1; i >=0; i--) + { + crc32 = 33 * crc32 + input[i]; + } + return crc32; + } + public static string GetEventArgsMethodReturnType(MrType argType, string methodName) { argType.GetMethodsAndConstructors(out var methods, out var ctors); diff --git a/package/windows/ReactNativeXaml/Codegen/TypeCreator.g.cpp b/package/windows/ReactNativeXaml/Codegen/TypeCreator.g.cpp index ee970db9..595c0762 100644 --- a/package/windows/ReactNativeXaml/Codegen/TypeCreator.g.cpp +++ b/package/windows/ReactNativeXaml/Codegen/TypeCreator.g.cpp @@ -16,6 +16,19 @@ THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT MODIFY MANUALLY **************************************************************/ +template +const T* binary_search_map(const std::pair (& map)[N], size_t low, size_t high, const K& key) { + while (low != high) { + size_t midpoint = (low + high) / 2; + if (map[midpoint].first == key) return &(map[midpoint].second); + else if (((high - low) % 2 == 1) && map[midpoint + 1].first == key) return &(map[midpoint + 1].second); + else if (key < map[midpoint].first) high = midpoint; + else /*if (key > map[midpoint].first)*/ low = midpoint + 1; + } + if (map[low].first == key) return &(map[low].second); + return nullptr; +} + winrt::Windows::Foundation::IInspectable XamlMetadata::Create(const std::string_view& typeName) const { wchar_t buf[128]{}; for (auto i = 0u; i < typeName.size() && i < ARRAYSIZE(buf) - 1; i++) { @@ -31,178 +44,182 @@ winrt::Windows::Foundation::IInspectable XamlMetadata::Create(const std::string_ WindowsDeleteString(clsid); return unk.as(); } else { - // type probably has a custom activation factory, use C++/WinRT to create it - WindowsDeleteString(clsid); - clsid = nullptr; - const auto key = COMPILE_TIME_CRC32_STR(typeName.data()); - switch (key) { - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.AnimatedIcon"): { return winrt::Microsoft::UI::Xaml::Controls::AnimatedIcon(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer"): { return winrt::Microsoft::UI::Xaml::Controls::AnimatedVisualPlayer(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.BreadcrumbBar"): { return winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBar(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.BreadcrumbBarItem"): { return winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItem(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ColorPicker"): { return winrt::Microsoft::UI::Xaml::Controls::ColorPicker(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.CommandBarFlyout"): { return winrt::Microsoft::UI::Xaml::Controls::CommandBarFlyout(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.DropDownButton"): { return winrt::Microsoft::UI::Xaml::Controls::DropDownButton(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Expander"): { return winrt::Microsoft::UI::Xaml::Controls::Expander(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ImageIcon"): { return winrt::Microsoft::UI::Xaml::Controls::ImageIcon(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.InfoBar"): { return winrt::Microsoft::UI::Xaml::Controls::InfoBar(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ItemsRepeater"): { return winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.MenuBar"): { return winrt::Microsoft::UI::Xaml::Controls::MenuBar(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.MenuBarItem"): { return winrt::Microsoft::UI::Xaml::Controls::MenuBarItem(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.MenuBarItemFlyout"): { return winrt::Microsoft::UI::Xaml::Controls::MenuBarItemFlyout(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NavigationView"): { return winrt::Microsoft::UI::Xaml::Controls::NavigationView(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NavigationViewItem"): { return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NavigationViewItemHeader"): { return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemHeader(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NavigationViewItemSeparator"): { return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemSeparator(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NumberBox"): { return winrt::Microsoft::UI::Xaml::Controls::NumberBox(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ParallaxView"): { return winrt::Microsoft::UI::Xaml::Controls::ParallaxView(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.PersonPicture"): { return winrt::Microsoft::UI::Xaml::Controls::PersonPicture(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.PipsPager"): { return winrt::Microsoft::UI::Xaml::Controls::PipsPager(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.ColorPickerSlider"): { return winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorPickerSlider(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum"): { return winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorSpectrum(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.CommandBarFlyoutCommandBar"): { return winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBar(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.InfoBarPanel"): { return winrt::Microsoft::UI::Xaml::Controls::Primitives::InfoBarPanel(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.MonochromaticOverlayPresenter"): { return winrt::Microsoft::UI::Xaml::Controls::Primitives::MonochromaticOverlayPresenter(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.NavigationViewItemPresenter"): { return winrt::Microsoft::UI::Xaml::Controls::Primitives::NavigationViewItemPresenter(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.TabViewListView"): { return winrt::Microsoft::UI::Xaml::Controls::Primitives::TabViewListView(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ProgressBar"): { return winrt::Microsoft::UI::Xaml::Controls::ProgressBar(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ProgressRing"): { return winrt::Microsoft::UI::Xaml::Controls::ProgressRing(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RadioButtons"): { return winrt::Microsoft::UI::Xaml::Controls::RadioButtons(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RadioMenuFlyoutItem"): { return winrt::Microsoft::UI::Xaml::Controls::RadioMenuFlyoutItem(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RatingControl"): { return winrt::Microsoft::UI::Xaml::Controls::RatingControl(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RefreshContainer"): { return winrt::Microsoft::UI::Xaml::Controls::RefreshContainer(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RefreshVisualizer"): { return winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RevealListViewItemPresenter"): { return winrt::Microsoft::UI::Xaml::Controls::RevealListViewItemPresenter(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.SplitButton"): { return winrt::Microsoft::UI::Xaml::Controls::SplitButton(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.SwipeControl"): { return winrt::Microsoft::UI::Xaml::Controls::SwipeControl(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TabView"): { return winrt::Microsoft::UI::Xaml::Controls::TabView(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TabViewItem"): { return winrt::Microsoft::UI::Xaml::Controls::TabViewItem(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TeachingTip"): { return winrt::Microsoft::UI::Xaml::Controls::TeachingTip(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TextCommandBarFlyout"): { return winrt::Microsoft::UI::Xaml::Controls::TextCommandBarFlyout(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ToggleSplitButton"): { return winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButton(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TreeView"): { return winrt::Microsoft::UI::Xaml::Controls::TreeView(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TreeViewItem"): { return winrt::Microsoft::UI::Xaml::Controls::TreeViewItem(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TreeViewList"): { return winrt::Microsoft::UI::Xaml::Controls::TreeViewList(); } - case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TwoPaneView"): { return winrt::Microsoft::UI::Xaml::Controls::TwoPaneView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBar"): { return winrt::Windows::UI::Xaml::Controls::AppBar(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBarButton"): { return winrt::Windows::UI::Xaml::Controls::AppBarButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBarElementContainer"): { return winrt::Windows::UI::Xaml::Controls::AppBarElementContainer(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBarSeparator"): { return winrt::Windows::UI::Xaml::Controls::AppBarSeparator(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBarToggleButton"): { return winrt::Windows::UI::Xaml::Controls::AppBarToggleButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.BitmapIcon"): { return winrt::Windows::UI::Xaml::Controls::BitmapIcon(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Button"): { return winrt::Windows::UI::Xaml::Controls::Button(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CalendarDatePicker"): { return winrt::Windows::UI::Xaml::Controls::CalendarDatePicker(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CalendarView"): { return winrt::Windows::UI::Xaml::Controls::CalendarView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CalendarViewDayItem"): { return winrt::Windows::UI::Xaml::Controls::CalendarViewDayItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Canvas"): { return winrt::Windows::UI::Xaml::Controls::Canvas(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CheckBox"): { return winrt::Windows::UI::Xaml::Controls::CheckBox(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ColorPicker"): { return winrt::Windows::UI::Xaml::Controls::ColorPicker(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ComboBox"): { return winrt::Windows::UI::Xaml::Controls::ComboBox(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ComboBoxItem"): { return winrt::Windows::UI::Xaml::Controls::ComboBoxItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CommandBar"): { return winrt::Windows::UI::Xaml::Controls::CommandBar(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CommandBarFlyout"): { return winrt::Windows::UI::Xaml::Controls::CommandBarFlyout(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CommandBarOverflowPresenter"): { return winrt::Windows::UI::Xaml::Controls::CommandBarOverflowPresenter(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ContentControl"): { return winrt::Windows::UI::Xaml::Controls::ContentControl(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ContentDialog"): { return winrt::Windows::UI::Xaml::Controls::ContentDialog(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ContentPresenter"): { return winrt::Windows::UI::Xaml::Controls::ContentPresenter(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.DatePicker"): { return winrt::Windows::UI::Xaml::Controls::DatePicker(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.DropDownButton"): { return winrt::Windows::UI::Xaml::Controls::DropDownButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.FlipView"): { return winrt::Windows::UI::Xaml::Controls::FlipView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.FlipViewItem"): { return winrt::Windows::UI::Xaml::Controls::FlipViewItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Flyout"): { return winrt::Windows::UI::Xaml::Controls::Flyout(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.FlyoutPresenter"): { return winrt::Windows::UI::Xaml::Controls::FlyoutPresenter(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.FontIcon"): { return winrt::Windows::UI::Xaml::Controls::FontIcon(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Frame"): { return winrt::Windows::UI::Xaml::Controls::Frame(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Grid"): { return winrt::Windows::UI::Xaml::Controls::Grid(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.GridView"): { return winrt::Windows::UI::Xaml::Controls::GridView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.GridViewHeaderItem"): { return winrt::Windows::UI::Xaml::Controls::GridViewHeaderItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.GridViewItem"): { return winrt::Windows::UI::Xaml::Controls::GridViewItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.GroupItem"): { return winrt::Windows::UI::Xaml::Controls::GroupItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.HandwritingView"): { return winrt::Windows::UI::Xaml::Controls::HandwritingView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Hub"): { return winrt::Windows::UI::Xaml::Controls::Hub(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.HubSection"): { return winrt::Windows::UI::Xaml::Controls::HubSection(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.HyperlinkButton"): { return winrt::Windows::UI::Xaml::Controls::HyperlinkButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.IconSourceElement"): { return winrt::Windows::UI::Xaml::Controls::IconSourceElement(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkCanvas"): { return winrt::Windows::UI::Xaml::Controls::InkCanvas(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbar"): { return winrt::Windows::UI::Xaml::Controls::InkToolbar(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarBallpointPenButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarBallpointPenButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarCustomPenButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarCustomPenButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarCustomToggleButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarCustomToggleButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarCustomToolButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarCustomToolButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarEraserButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarEraserButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarFlyoutItem"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarFlyoutItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarHighlighterButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarHighlighterButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarPencilButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarPencilButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarPenConfigurationControl"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarPenConfigurationControl(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarRulerButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarRulerButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarStencilButton"): { return winrt::Windows::UI::Xaml::Controls::InkToolbarStencilButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ItemsControl"): { return winrt::Windows::UI::Xaml::Controls::ItemsControl(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListBox"): { return winrt::Windows::UI::Xaml::Controls::ListBox(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListBoxItem"): { return winrt::Windows::UI::Xaml::Controls::ListBoxItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListView"): { return winrt::Windows::UI::Xaml::Controls::ListView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListViewHeaderItem"): { return winrt::Windows::UI::Xaml::Controls::ListViewHeaderItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListViewItem"): { return winrt::Windows::UI::Xaml::Controls::ListViewItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MediaPlayerElement"): { return winrt::Windows::UI::Xaml::Controls::MediaPlayerElement(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MediaPlayerPresenter"): { return winrt::Windows::UI::Xaml::Controls::MediaPlayerPresenter(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MediaTransportControls"): { return winrt::Windows::UI::Xaml::Controls::MediaTransportControls(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuBar"): { return winrt::Windows::UI::Xaml::Controls::MenuBar(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuBarItem"): { return winrt::Windows::UI::Xaml::Controls::MenuBarItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuBarItemFlyout"): { return winrt::Windows::UI::Xaml::Controls::MenuBarItemFlyout(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuFlyout"): { return winrt::Windows::UI::Xaml::Controls::MenuFlyout(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuFlyoutItem"): { return winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuFlyoutPresenter"): { return winrt::Windows::UI::Xaml::Controls::MenuFlyoutPresenter(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuFlyoutSeparator"): { return winrt::Windows::UI::Xaml::Controls::MenuFlyoutSeparator(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationView"): { return winrt::Windows::UI::Xaml::Controls::NavigationView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationViewItem"): { return winrt::Windows::UI::Xaml::Controls::NavigationViewItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationViewItemHeader"): { return winrt::Windows::UI::Xaml::Controls::NavigationViewItemHeader(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationViewItemSeparator"): { return winrt::Windows::UI::Xaml::Controls::NavigationViewItemSeparator(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationViewList"): { return winrt::Windows::UI::Xaml::Controls::NavigationViewList(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Page"): { return winrt::Windows::UI::Xaml::Controls::Page(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ParallaxView"): { return winrt::Windows::UI::Xaml::Controls::ParallaxView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.PathIcon"): { return winrt::Windows::UI::Xaml::Controls::PathIcon(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.PersonPicture"): { return winrt::Windows::UI::Xaml::Controls::PersonPicture(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Pivot"): { return winrt::Windows::UI::Xaml::Controls::Pivot(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.PivotItem"): { return winrt::Windows::UI::Xaml::Controls::PivotItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.CarouselPanel"): { return winrt::Windows::UI::Xaml::Controls::Primitives::CarouselPanel(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.ColorPickerSlider"): { return winrt::Windows::UI::Xaml::Controls::Primitives::ColorPickerSlider(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.ColorSpectrum"): { return winrt::Windows::UI::Xaml::Controls::Primitives::ColorSpectrum(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.CommandBarFlyoutCommandBar"): { return winrt::Windows::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBar(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.GridViewItemPresenter"): { return winrt::Windows::UI::Xaml::Controls::Primitives::GridViewItemPresenter(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.ListViewItemPresenter"): { return winrt::Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenter(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.NavigationViewItemPresenter"): { return winrt::Windows::UI::Xaml::Controls::Primitives::NavigationViewItemPresenter(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.PivotHeaderItem"): { return winrt::Windows::UI::Xaml::Controls::Primitives::PivotHeaderItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.ToggleButton"): { return winrt::Windows::UI::Xaml::Controls::Primitives::ToggleButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ProgressBar"): { return winrt::Windows::UI::Xaml::Controls::ProgressBar(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RadioButton"): { return winrt::Windows::UI::Xaml::Controls::RadioButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RatingControl"): { return winrt::Windows::UI::Xaml::Controls::RatingControl(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RefreshContainer"): { return winrt::Windows::UI::Xaml::Controls::RefreshContainer(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RefreshVisualizer"): { return winrt::Windows::UI::Xaml::Controls::RefreshVisualizer(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RelativePanel"): { return winrt::Windows::UI::Xaml::Controls::RelativePanel(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RichEditBox"): { return winrt::Windows::UI::Xaml::Controls::RichEditBox(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SearchBox"): { return winrt::Windows::UI::Xaml::Controls::SearchBox(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SettingsFlyout"): { return winrt::Windows::UI::Xaml::Controls::SettingsFlyout(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Slider"): { return winrt::Windows::UI::Xaml::Controls::Slider(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SplitButton"): { return winrt::Windows::UI::Xaml::Controls::SplitButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SplitView"): { return winrt::Windows::UI::Xaml::Controls::SplitView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.StackPanel"): { return winrt::Windows::UI::Xaml::Controls::StackPanel(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SwapChainBackgroundPanel"): { return winrt::Windows::UI::Xaml::Controls::SwapChainBackgroundPanel(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SwapChainPanel"): { return winrt::Windows::UI::Xaml::Controls::SwapChainPanel(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SwipeControl"): { return winrt::Windows::UI::Xaml::Controls::SwipeControl(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TextBox"): { return winrt::Windows::UI::Xaml::Controls::TextBox(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TextCommandBarFlyout"): { return winrt::Windows::UI::Xaml::Controls::TextCommandBarFlyout(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TimePicker"): { return winrt::Windows::UI::Xaml::Controls::TimePicker(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ToggleMenuFlyoutItem"): { return winrt::Windows::UI::Xaml::Controls::ToggleMenuFlyoutItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ToggleSplitButton"): { return winrt::Windows::UI::Xaml::Controls::ToggleSplitButton(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ToolTip"): { return winrt::Windows::UI::Xaml::Controls::ToolTip(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TreeView"): { return winrt::Windows::UI::Xaml::Controls::TreeView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TreeViewItem"): { return winrt::Windows::UI::Xaml::Controls::TreeViewItem(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TreeViewList"): { return winrt::Windows::UI::Xaml::Controls::TreeViewList(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TwoPaneView"): { return winrt::Windows::UI::Xaml::Controls::TwoPaneView(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.UserControl"): { return winrt::Windows::UI::Xaml::Controls::UserControl(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Documents.Span"): { return winrt::Windows::UI::Xaml::Documents::Span(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Input.KeyboardAccelerator"): { return winrt::Windows::UI::Xaml::Input::KeyboardAccelerator(); } - case COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Shapes.Path"): { return winrt::Windows::UI::Xaml::Shapes::Path(); } - } + // type probably has a custom activation factory, use C++/WinRT to create it + WindowsDeleteString(clsid); + clsid = nullptr; + const auto key = COMPILE_TIME_CRC32_STR(typeName.data()); + static constexpr const std::pair map[] = { + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarPenConfigurationControl"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarPenConfigurationControl(); } }, // 0x013FED5D + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarCustomPenButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarCustomPenButton(); } }, // 0x0827785B + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.SwipeControl"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::SwipeControl(); } }, // 0x0990BF40 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.NavigationViewItemPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::Primitives::NavigationViewItemPresenter(); } }, // 0x09E65E23 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.GridViewItemPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::GridViewItemPresenter(); } }, // 0x0AA85A4E + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ComboBoxItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ComboBoxItem(); } }, // 0x0BB1FA54 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CommandBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::CommandBar(); } }, // 0x0D634880 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.GridView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::GridView(); } }, // 0x0DAD786D + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.ToggleButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::ToggleButton(); } }, // 0x0DC50A84 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Button"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Button(); } }, // 0x0E164BC8 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarBallpointPenButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarBallpointPenButton(); } }, // 0x10E31045 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RelativePanel"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::RelativePanel(); } }, // 0x133EC978 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TimePicker"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::TimePicker(); } }, // 0x1344CE79 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TreeViewList"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::TreeViewList(); } }, // 0x1361AC13 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarCustomToggleButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarCustomToggleButton(); } }, // 0x1456881A + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarCustomToolButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarCustomToolButton(); } }, // 0x14AEE156 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Input.KeyboardAccelerator"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Input::KeyboardAccelerator(); } }, // 0x1508A89E + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationViewItemHeader"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::NavigationViewItemHeader(); } }, // 0x1541E74F + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.StackPanel"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::StackPanel(); } }, // 0x1657B672 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Hub"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Hub(); } }, // 0x16D5A5AB + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.DatePicker"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::DatePicker(); } }, // 0x1794DE08 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RatingControl"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::RatingControl(); } }, // 0x1864387D + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorSpectrum(); } }, // 0x19AF6043 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SettingsFlyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::SettingsFlyout(); } }, // 0x19FED760 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.HyperlinkButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::HyperlinkButton(); } }, // 0x1A40F8DE + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ColorPicker"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ColorPicker(); } }, // 0x1BB82E89 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CheckBox"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::CheckBox(); } }, // 0x1C604AF3 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TreeView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::TreeView(); } }, // 0x1E6A9922 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListBoxItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ListBoxItem(); } }, // 0x1EFA9FE0 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RefreshVisualizer"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer(); } }, // 0x1F3B6F74 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Documents.Span"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Documents::Span(); } }, // 0x1FC795BC + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.PathIcon"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::PathIcon(); } }, // 0x21564582 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ContentDialog"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ContentDialog(); } }, // 0x218E0D37 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.BreadcrumbBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBar(); } }, // 0x25873963 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBarToggleButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::AppBarToggleButton(); } }, // 0x2623C040 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::AnimatedVisualPlayer(); } }, // 0x2793AA7B + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.SplitButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::SplitButton(); } }, // 0x29E1839F + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationViewList"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::NavigationViewList(); } }, // 0x2ACB18F3 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CalendarViewDayItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::CalendarViewDayItem(); } }, // 0x2BAE0D4E + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Page"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Page(); } }, // 0x2C2B2509 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.FlipViewItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::FlipViewItem(); } }, // 0x34DBD261 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.BitmapIcon"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::BitmapIcon(); } }, // 0x36296D32 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.MonochromaticOverlayPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::Primitives::MonochromaticOverlayPresenter(); } }, // 0x3630F3BE + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.CommandBarFlyoutCommandBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBar(); } }, // 0x3837767C + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.CommandBarFlyoutCommandBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBar(); } }, // 0x387E3DF1 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.UserControl"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::UserControl(); } }, // 0x39F6F92C + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TreeView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::TreeView(); } }, // 0x3E1C7F17 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MediaPlayerElement"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MediaPlayerElement(); } }, // 0x41790703 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.PivotHeaderItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::PivotHeaderItem(); } }, // 0x428CCCF0 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.ColorPickerSlider"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorPickerSlider(); } }, // 0x429CFFB1 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuFlyoutPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MenuFlyoutPresenter(); } }, // 0x433B1F7C + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ProgressBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::ProgressBar(); } }, // 0x434DAC41 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ComboBox"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ComboBox(); } }, // 0x49D96BC5 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.InfoBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::InfoBar(); } }, // 0x4A514458 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarFlyoutItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarFlyoutItem(); } }, // 0x4AA78CB3 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.IconSourceElement"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::IconSourceElement(); } }, // 0x4AFAB350 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RadioMenuFlyoutItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::RadioMenuFlyoutItem(); } }, // 0x4B5B3D4D + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ImageIcon"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::ImageIcon(); } }, // 0x4D060983 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TextCommandBarFlyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::TextCommandBarFlyout(); } }, // 0x4FDE4DA8 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuFlyoutSeparator"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MenuFlyoutSeparator(); } }, // 0x53E44A55 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.FontIcon"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::FontIcon(); } }, // 0x5441998C + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NavigationViewItemHeader"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemHeader(); } }, // 0x548AEF5A + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SplitButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::SplitButton(); } }, // 0x54ECA654 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MediaTransportControls"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MediaTransportControls(); } }, // 0x55BED84D + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.DropDownButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::DropDownButton(); } }, // 0x5886BD75 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ItemsRepeater"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater(); } }, // 0x58B3F731 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.AnimatedIcon"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::AnimatedIcon(); } }, // 0x59601223 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TreeViewList"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::TreeViewList(); } }, // 0x59AEF51E + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationViewItemSeparator"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::NavigationViewItemSeparator(); } }, // 0x59EF1A37 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuFlyoutItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem(); } }, // 0x5AC99C33 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListViewHeaderItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ListViewHeaderItem(); } }, // 0x5E5331BB + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ParallaxView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ParallaxView(); } }, // 0x608E6B3C + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.MenuBarItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::MenuBarItem(); } }, // 0x64181650 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.PersonPicture"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::PersonPicture(); } }, // 0x657ADBEA + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.MenuBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::MenuBar(); } }, // 0x672DB5E1 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ToggleSplitButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButton(); } }, // 0x6AE03DE1 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Frame"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Frame(); } }, // 0x6AF31BF7 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.ListViewItemPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::ListViewItemPresenter(); } }, // 0x6C046CC4 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::NavigationView(); } }, // 0x6D011EF7 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TabViewItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::TabViewItem(); } }, // 0x6E27C7F8 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::AppBar(); } }, // 0x6E6263E2 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ProgressBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ProgressBar(); } }, // 0x6E923E76 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ToggleSplitButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ToggleSplitButton(); } }, // 0x6F13E816 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TabView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::TabView(); } }, // 0x713D6789 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkCanvas"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkCanvas(); } }, // 0x724C60CA + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.CommandBarFlyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::CommandBarFlyout(); } }, // 0x72A1454E + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SwapChainPanel"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::SwapChainPanel(); } }, // 0x72B6905A + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.FlipView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::FlipView(); } }, // 0x730343D2 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TwoPaneView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::TwoPaneView(); } }, // 0x740B0045 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RefreshContainer"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::RefreshContainer(); } }, // 0x754ECAE9 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NumberBox"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::NumberBox(); } }, // 0x77315EE9 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RevealListViewItemPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::RevealListViewItemPresenter(); } }, // 0x78121ED4 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NavigationViewItemSeparator"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemSeparator(); } }, // 0x79507C42 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CommandBarFlyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::CommandBarFlyout(); } }, // 0x7A223043 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.InfoBarPanel"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::Primitives::InfoBarPanel(); } }, // 0x7ADE8782 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.DropDownButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::DropDownButton(); } }, // 0x7C5DE700 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.PersonPicture"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::PersonPicture(); } }, // 0x7D2D6FDF + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.ColorPickerSlider"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::ColorPickerSlider(); } }, // 0x7E15F5E6 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.ColorSpectrum"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::ColorSpectrum(); } }, // 0x819309F8 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListViewItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ListViewItem(); } }, // 0x87C86732 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuBar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MenuBar(); } }, // 0x89A36016 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TwoPaneView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::TwoPaneView(); } }, // 0x89FE1DD0 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.HandwritingView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::HandwritingView(); } }, // 0x8A5BF526 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarRulerButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarRulerButton(); } }, // 0x8D42B267 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.CarouselPanel"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::CarouselPanel(); } }, // 0x9128F614 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NavigationView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::NavigationView(); } }, // 0x98F6B102 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RefreshContainer"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::RefreshContainer(); } }, // 0xA4EB931E + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ParallaxView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::ParallaxView(); } }, // 0xA5082287 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.GridViewHeaderItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::GridViewHeaderItem(); } }, // 0xA610D185 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ItemsControl"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ItemsControl(); } }, // 0xA67F836F + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TextCommandBarFlyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::TextCommandBarFlyout(); } }, // 0xA7DA4FF3 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SearchBox"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::SearchBox(); } }, // 0xA8C11D6B + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarHighlighterButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarHighlighterButton(); } }, // 0xA9BFE0CC + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RichEditBox"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::RichEditBox(); } }, // 0xAA31A661 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CalendarView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::CalendarView(); } }, // 0xAA50A581 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TextBox"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::TextBox(); } }, // 0xAA8E601A + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbar"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbar(); } }, // 0xABDEF761 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SwapChainBackgroundPanel"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::SwapChainBackgroundPanel(); } }, // 0xAE850A7A + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBarSeparator"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::AppBarSeparator(); } }, // 0xB05CEFD3 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Primitives.TabViewListView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::Primitives::TabViewListView(); } }, // 0xB25E1EFA + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Slider"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Slider(); } }, // 0xB4C5592F + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuBarItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MenuBarItem(); } }, // 0xB64CD8C5 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TreeViewItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::TreeViewItem(); } }, // 0xB8A10771 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarStencilButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarStencilButton(); } }, // 0xBA65530F + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.TeachingTip"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::TeachingTip(); } }, // 0xBA7DAD87 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBarElementContainer"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::AppBarElementContainer(); } }, // 0xBACFEF0F + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuBarItemFlyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MenuBarItemFlyout(); } }, // 0xBAE8B8E8 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.PivotItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::PivotItem(); } }, // 0xBB51F34D + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.HubSection"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::HubSection(); } }, // 0xBB79E3A0 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MenuFlyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MenuFlyout(); } }, // 0xC0932DE4 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Shapes.Path"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Shapes::Path(); } }, // 0xC258CF49 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ListView(); } }, // 0xC5EFD8A3 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RefreshVisualizer"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::RefreshVisualizer(); } }, // 0xC9BF98E9 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.NavigationViewItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem(); } }, // 0xCB005E91 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.GroupItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::GroupItem(); } }, // 0xCE599348 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.GridViewItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::GridViewItem(); } }, // 0xCF8606FC + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.RadioButtons"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::RadioButtons(); } }, // 0xD0286295 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ColorPicker"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::ColorPicker(); } }, // 0xD1AFED14 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Primitives.NavigationViewItemPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Primitives::NavigationViewItemPresenter(); } }, // 0xD2310FD8 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.AppBarButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::AppBarButton(); } }, // 0xD3492DFE + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Expander"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::Expander(); } }, // 0xD621D82E + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarPencilButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarPencilButton(); } }, // 0xD6FF91F8 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CalendarDatePicker"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::CalendarDatePicker(); } }, // 0xD7CD3262 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.FlyoutPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::FlyoutPresenter(); } }, // 0xD9139447 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.MediaPlayerPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::MediaPlayerPresenter(); } }, // 0xDB985D91 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.CommandBarOverflowPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::CommandBarOverflowPresenter(); } }, // 0xDE39968C + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SwipeControl"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::SwipeControl(); } }, // 0xDEA685B5 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Flyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Flyout(); } }, // 0xE014AEAF + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.BreadcrumbBarItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItem(); } }, // 0xE139F112 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ContentPresenter"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ContentPresenter(); } }, // 0xE87699FF + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.InkToolbarEraserButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::InkToolbarEraserButton(); } }, // 0xE98232BF + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RadioButton"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::RadioButton(); } }, // 0xECD2D137 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Canvas"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Canvas(); } }, // 0xEDC81488 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.SplitView"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::SplitView(); } }, // 0xEF18D013 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ListBox"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ListBox(); } }, // 0xF2512731 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ToggleMenuFlyoutItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ToggleMenuFlyoutItem(); } }, // 0xF40F8935 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.PipsPager"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::PipsPager(); } }, // 0xF454ECC2 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ProgressRing"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::ProgressRing(); } }, // 0xF55A4A1C + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Pivot"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Pivot(); } }, // 0xF60C725E + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.RatingControl"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::RatingControl(); } }, // 0xF6E08BB2 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ToolTip"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ToolTip(); } }, // 0xFA2345F7 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.ContentControl"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::ContentControl(); } }, // 0xFA3EF4E8 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.Grid"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::Grid(); } }, // 0xFE197772 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.NavigationViewItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::NavigationViewItem(); } }, // 0xFE541CC6 + { COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.MenuBarItemFlyout"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Microsoft::UI::Xaml::Controls::MenuBarItemFlyout(); } }, // 0xFF2C8B33 + { COMPILE_TIME_CRC32_STR("Windows.UI.Xaml.Controls.TreeViewItem"), []() -> winrt::Windows::Foundation::IInspectable { return winrt::Windows::UI::Xaml::Controls::TreeViewItem(); } }, // 0xFFF50DA6 + }; + + if (const auto it = binary_search_map(map, 0, std::size(map), key)) { + return (* it)(); + } } } assert(false && "xaml type not found"); diff --git a/package/windows/ReactNativeXaml/XamlMetadata.cpp b/package/windows/ReactNativeXaml/XamlMetadata.cpp index cc1d5d7b..59bd88ca 100644 --- a/package/windows/ReactNativeXaml/XamlMetadata.cpp +++ b/package/windows/ReactNativeXaml/XamlMetadata.cpp @@ -104,7 +104,9 @@ void SetIsOpen_FlyoutBase(const xaml::DependencyObject& o, const xaml::Dependenc flyout.ShowAt(target); } else { - cdebug << "Couldn't determine flyout target\n"; +#ifdef DEBUG + cdebug << "Couldn't determine flyout target\n"; +#endif } } else { diff --git a/package/windows/ReactNativeXaml/XamlViewManager.cpp b/package/windows/ReactNativeXaml/XamlViewManager.cpp index 453c1d19..a030b02b 100644 --- a/package/windows/ReactNativeXaml/XamlViewManager.cpp +++ b/package/windows/ReactNativeXaml/XamlViewManager.cpp @@ -350,8 +350,10 @@ namespace winrt::ReactNativeXaml { } auto parentType = get_class_name(e); +#ifdef DEBUG cdebug << "[react-native-xaml] Unhandled call to RemoveAllChildren with parent: " << parentType << "\n"; +#endif } void XamlViewManager::RemoveChildAt(xaml::FrameworkElement parent, int64_t index) { @@ -372,8 +374,10 @@ namespace winrt::ReactNativeXaml { } auto parentType = get_class_name(e); +#ifdef DEBUG cdebug << "[react-native-xaml] Unhandled call to RemoveChildAt with parent: " << parentType << ", index: " << index << "\n"; +#endif } void XamlViewManager::ReplaceChild(xaml::FrameworkElement parent, xaml::UIElement oldChild, xaml::UIElement newChild) { From 17c62007fd6d87739793cfe1a4c79f995d189903 Mon Sep 17 00:00:00 2001 From: Alexander Sklar Date: Tue, 26 Apr 2022 01:37:41 -0700 Subject: [PATCH 2/5] Change files --- ...t-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/react-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json diff --git a/change/react-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json b/change/react-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json new file mode 100644 index 00000000..0128536f --- /dev/null +++ b/change/react-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Use hashed string values for type creator lookup", + "packageName": "react-native-xaml", + "email": "asklar@microsoft.com", + "dependentChangeType": "patch" +} From 6e6809c38f82332c62e2434572ee5a805d3436a5 Mon Sep 17 00:00:00 2001 From: Alexander Sklar Date: Tue, 26 Apr 2022 01:42:52 -0700 Subject: [PATCH 3/5] bump version --- ...xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json | 7 ------- package/CHANGELOG.json | 15 +++++++++++++++ package/CHANGELOG.md | 10 +++++++++- package/Codegen/TypeCreator.cs | 4 ++-- package/Codegen/TypeCreator.tt | 2 +- package/package.json | 2 +- .../windows/ReactNativeXaml/Codegen/Version.g.h | 2 +- 7 files changed, 29 insertions(+), 13 deletions(-) delete mode 100644 change/react-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json diff --git a/change/react-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json b/change/react-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json deleted file mode 100644 index 0128536f..00000000 --- a/change/react-native-xaml-afc66e36-8f27-44ac-a827-d806ef2b49ae.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Use hashed string values for type creator lookup", - "packageName": "react-native-xaml", - "email": "asklar@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/package/CHANGELOG.json b/package/CHANGELOG.json index 5bba0ae9..f6e5a7d1 100644 --- a/package/CHANGELOG.json +++ b/package/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "react-native-xaml", "entries": [ + { + "date": "Tue, 26 Apr 2022 08:42:12 GMT", + "tag": "react-native-xaml_v0.0.64", + "version": "0.0.64", + "comments": { + "patch": [ + { + "author": "asklar@microsoft.com", + "package": "react-native-xaml", + "comment": "Use hashed string values for type creator lookup", + "commit": "17c62007fd6d87739793cfe1a4c79f995d189903" + } + ] + } + }, { "date": "Wed, 13 Apr 2022 21:16:52 GMT", "tag": "react-native-xaml_v0.0.63", diff --git a/package/CHANGELOG.md b/package/CHANGELOG.md index dba81572..ca2c038c 100644 --- a/package/CHANGELOG.md +++ b/package/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - react-native-xaml -This log was last generated on Wed, 13 Apr 2022 21:16:52 GMT and should not be manually modified. +This log was last generated on Tue, 26 Apr 2022 08:42:12 GMT and should not be manually modified. +## 0.0.64 + +Tue, 26 Apr 2022 08:42:12 GMT + +### Patches + +- Use hashed string values for type creator lookup (asklar@microsoft.com) + ## 0.0.63 Wed, 13 Apr 2022 21:16:52 GMT diff --git a/package/Codegen/TypeCreator.cs b/package/Codegen/TypeCreator.cs index 76896b4b..d28f0723 100644 --- a/package/Codegen/TypeCreator.cs +++ b/package/Codegen/TypeCreator.cs @@ -71,8 +71,8 @@ public virtual string TransformText() "turn unk.as();\r\n } else {\r\n // type probably has a " + "custom activation factory, use C++/WinRT to create it\r\n WindowsDeleteString" + "(clsid);\r\n clsid = nullptr;\r\n const auto key = COMPILE_TIME_CRC32_STR(" + - "typeName.data());\r\n const std::pair map[] = {\r\n"); + "typeName.data());\r\n static constexpr const std::pair map[] = {\r\n"); #line 52 "C:\Users\asklar\source\repos\react-native-xaml\package\Codegen\TypeCreator.tt" foreach (var t in Types.Where(t => Util.GetComposableFactoryType(t) != null).OrderBy(t => Util.GetCRC32(t.GetFullName()))) { diff --git a/package/Codegen/TypeCreator.tt b/package/Codegen/TypeCreator.tt index 62d212b6..2611c045 100644 --- a/package/Codegen/TypeCreator.tt +++ b/package/Codegen/TypeCreator.tt @@ -48,7 +48,7 @@ winrt::Windows::Foundation::IInspectable XamlMetadata::Create(const std::string_ WindowsDeleteString(clsid); clsid = nullptr; const auto key = COMPILE_TIME_CRC32_STR(typeName.data()); - const std::pair map[] = { + static constexpr const std::pair map[] = { <# foreach (var t in Types.Where(t => Util.GetComposableFactoryType(t) != null).OrderBy(t => Util.GetCRC32(t.GetFullName()))) { #> { COMPILE_TIME_CRC32_STR("<#= t.GetFullName() #>"), []() -> winrt::Windows::Foundation::IInspectable { return <#= Util.GetCppWinRTType(t) #>(); } }, // 0x<#= Util.GetCRC32(t.GetFullName()).ToString("X8") #> <# } #> diff --git a/package/package.json b/package/package.json index 7917c065..cd1a6c6e 100644 --- a/package/package.json +++ b/package/package.json @@ -1,7 +1,7 @@ { "name": "react-native-xaml", "title": "React Native Xaml", - "version": "0.0.63", + "version": "0.0.64", "description": "Allows using XAML directly, inside of a React Native Windows app", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/package/windows/ReactNativeXaml/Codegen/Version.g.h b/package/windows/ReactNativeXaml/Codegen/Version.g.h index 062fbf36..9d1b49d1 100644 --- a/package/windows/ReactNativeXaml/Codegen/Version.g.h +++ b/package/windows/ReactNativeXaml/Codegen/Version.g.h @@ -7,4 +7,4 @@ THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT MODIFY MANUALLY #define VERSION_MAJOR 0 #define VERSION_MINOR 0 #define VERSION_REVISION 0 -#define VERSION_BUILD 63 +#define VERSION_BUILD 64 From 74555ae005b90440f4797f91d3373035dcb87a3a Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Wed, 2 Aug 2023 11:31:36 -0700 Subject: [PATCH 4/5] Change files --- ...t-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json diff --git a/change/react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json b/change/react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json new file mode 100644 index 00000000..e310a964 --- /dev/null +++ b/change/react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Use hashed string values for type creator lookup", + "packageName": "react-native-xaml", + "email": "jthysell@microsoft.com", + "dependentChangeType": "patch" +} From b62aff636447048c9a5e602aa4a5acbd418b49e8 Mon Sep 17 00:00:00 2001 From: Jon Thysell Date: Wed, 2 Aug 2023 11:34:02 -0700 Subject: [PATCH 5/5] Fix PR attribution --- .../react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json b/change/react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json index e310a964..0128536f 100644 --- a/change/react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json +++ b/change/react-native-xaml-d8f62d95-81b1-4d02-92d9-77455325ed26.json @@ -2,6 +2,6 @@ "type": "patch", "comment": "Use hashed string values for type creator lookup", "packageName": "react-native-xaml", - "email": "jthysell@microsoft.com", + "email": "asklar@microsoft.com", "dependentChangeType": "patch" }