diff --git a/nuget/Microsoft.Windows.CsWinRT.CsWinRTGen.targets b/nuget/Microsoft.Windows.CsWinRT.CsWinRTGen.targets index 1c3ad8a56..a5b69a70e 100644 --- a/nuget/Microsoft.Windows.CsWinRT.CsWinRTGen.targets +++ b/nuget/Microsoft.Windows.CsWinRT.CsWinRTGen.targets @@ -8,7 +8,9 @@ Copyright (C) Microsoft Corporation. All rights reserved. $(SolutionDir)RunCsWinRTGeneratorTask\bin\$(Configuration)\netstandard2.0\RunCsWinRTGeneratorTask.dll - $(SolutionDir)WinRT.Interop.Generator\bin\$(Configuration)\net10.0\ + $(SolutionDir)WinRT.Interop.Generator\bin\$(Configuration)\net10.0\ + $(SolutionDir)WinRT.Impl.Generator\bin\$(Configuration)\net10.0\ + $(SolutionDir)WinRT.Projection.Generator\bin\$(Configuration)\net10.0\ AnyCPU <_TargetPlatformVersionUsesCsWinRT3>true @@ -17,7 +19,8 @@ Copyright (C) Microsoft Corporation. All rights reserved. So the switch for it is currently opt-in. It can be changed to opt-out in the future. We only enable this automatically if the project is explicitly targeting CsWinRT 3.0. --> - true + true + true false <_RunCsWinRTGeneratorPropertyInputsCachePath Condition="'$(_RunCsWinRTGeneratorPropertyInputsCachePath)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).cswinrtgen.cache <_RunCsWinRTGeneratorPropertyInputsCachePath>$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '$(_RunCsWinRTGeneratorPropertyInputsCachePath)')) + + + $(IntermediateOutputPath)\forwarder\ + <_CsWinRTGeneratorForwarderAssemblyPath>$(CsWinRTGeneratorForwarderAssemblyDirectory)$(AssemblyName).dll + + + <_CsWinRTGeneratorMergedProjectionAssemblyPath>$(IntermediateOutputPath)WinRT.Projection.dll + <_CsWinRTGeneratorMergedProjectionOutputAssemblyPath>WinRT.Projection.dll + + $(DefineConstants);CSWINRT_REFERENCE_PROJECTION - + + <_RunCsWinRTGeneratorInputsCacheToHash Include="$(CsWinRTEffectiveToolsDirectory)" /> @@ -125,17 +156,17 @@ Copyright (C) Microsoft Corporation. All rights reserved. Name="_RunCsWinRTGenerator" DependsOnTargets="CoreCompile;$(GetTargetPathDependsOn);$(GetTargetPathWithTargetPlatformMonikerDependsOn);_ComputeRunCsWinRTGeneratorCache" BeforeTargets="GetTargetPath;GetTargetPathWithTargetPlatformMoniker;GenerateBuildDependencyFile;GeneratePublishDependencyFile;GetCopyToOutputDirectoryItems;GetCopyToPublishDirectoryItems" - Inputs="@(ReferencePath);@(IntermediateAssembly);$(_RunCsWinRTGeneratorPropertyInputsCachePath)" + Inputs="@(ReferencePathWithRefAssemblies);@(IntermediateAssembly);$(_RunCsWinRTGeneratorPropertyInputsCachePath)" Outputs="$(_CsWinRTGeneratorInteropAssemblyPath)" Condition="'$(CsWinRTGenerateInteropAssembly)' == 'true'"> + + + + + + + + + + + + + + + + + + + + + + @(CsWinRTInputs) + + + + + + + + + + <_ReferencePathsWithWinMDs Include="@(ReferencePathWithRefAssemblies)" Condition="'%(ReferencePathWithRefAssemblies.CsWinRTInputs)' != ''" /> + <_WinMDPathsList Include="@(CsWinRTInputs)" /> + <_WinMDPathsList Include="$([MSBuild]::ValueOrDefault('%(_ReferencePathsWithWinMDs.CsWinRTInputs)', '').Split(';'))" + Condition="'%(_ReferencePathsWithWinMDs.CsWinRTInputs)' != ''" /> + <_WinMDPathsList Include="$(CsWinRTInteropMetadata)" /> + + + + + + + + + WinRT.Projection + .NETCoreApp + false + true + true + _RunCsWinRTMergedProjectionGenerator + AnyCPU + + + + + + + + + + + + <_SourceItemsToCopyToOutputDirectory + Include="@(CsWinRTGeneratorMergedProjectionPath)" + TargetPath="$(_CsWinRTGeneratorMergedProjectionOutputAssemblyPath)" /> + + + + + + + + \ No newline at end of file diff --git a/nuget/Microsoft.Windows.CsWinRT.targets b/nuget/Microsoft.Windows.CsWinRT.targets index ae18e9af7..9b817dff0 100644 --- a/nuget/Microsoft.Windows.CsWinRT.targets +++ b/nuget/Microsoft.Windows.CsWinRT.targets @@ -13,6 +13,11 @@ Copyright (C) Microsoft Corporation. All rights reserved. false false true + false + false + true + true + $([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName))) true + true + + + WindowsRuntime.ProjectionGenerator + + + cswinrtprojectiongen + + + true + true + latest + latest-all + true + strict + true + + + + + + + + diff --git a/src/cswinrt.slnx b/src/cswinrt.slnx index 7db15b0a3..5257edd28 100644 --- a/src/cswinrt.slnx +++ b/src/cswinrt.slnx @@ -175,8 +175,7 @@ - - + @@ -356,6 +355,7 @@ + diff --git a/src/cswinrt/code_writers.h b/src/cswinrt/code_writers.h index 13ff88e44..b8148fb8c 100644 --- a/src/cswinrt/code_writers.h +++ b/src/cswinrt/code_writers.h @@ -1588,6 +1588,12 @@ namespace cswinrt void write_abi_static_method_call(writer& w, type_semantics const& iface, MethodDef const& method, std::string const& targetObjRef) { + if (settings.reference_projection) + { + w.write("throw null"); + return; + } + method_signature signature{ method }; w.write("%.%(%%%)", bind(iface, typedef_name_type::StaticAbiClass, true), method.Name(), @@ -1598,6 +1604,12 @@ namespace cswinrt void write_unsafe_accessor_static_method_call(writer& w, std::string const& unsafeAccessorMethod, MethodDef const& method, std::string const& targetObjRef) { + if (settings.reference_projection) + { + w.write("throw null"); + return; + } + method_signature signature{ method }; w.write("%(null, %%%)", unsafeAccessorMethod, @@ -1608,6 +1620,12 @@ namespace cswinrt void write_abi_get_property_static_method_call(writer& w, type_semantics const& iface, Property const& prop, std::string const& targetObjRef) { + if (settings.reference_projection) + { + w.write("throw null"); + return; + } + w.write("%.%(%)", bind(iface, typedef_name_type::StaticAbiClass, true), prop.Name(), @@ -1616,6 +1634,12 @@ namespace cswinrt void write_abi_set_property_static_method_call(writer& w, type_semantics const& iface, Property const& prop, std::string const& targetObjRef) { + if (settings.reference_projection) + { + w.write("throw null"); + return; + } + w.write("%.%(%, value)", bind(iface, typedef_name_type::StaticAbiClass, true), prop.Name(), @@ -1624,6 +1648,12 @@ namespace cswinrt void write_unsafe_accessor_property_static_method_call(writer& w, std::string const& unsafeAccessorMethod, std::string const& targetObjRef, bool get) { + if (settings.reference_projection) + { + w.write("throw null"); + return; + } + w.write("%(null, %%)", unsafeAccessorMethod, targetObjRef, @@ -1632,6 +1662,12 @@ namespace cswinrt void write_abi_event_source_static_method_call(writer& w, type_semantics const& iface, Event const& evt, bool isSubscribeCall, std::string const& targetObjRef, bool is_static_event = false) { + if (settings.reference_projection) + { + w.write("throw null"); + return; + } + bool is_unsafe_accessor_call = false; w.write("%(%, %).%(value)", bind([&](writer& w) { @@ -2611,6 +2647,22 @@ private static % _% = new %("%.%", %.IID); void write_activation_factory_objref_definition(writer& w, TypeDef const& classType) { auto objrefname = w.write_temp("%", bind(classType)); + if (settings.reference_projection) + { + w.write(R"( +private static WindowsRuntimeObjectReference % +{ + get + { + throw null; + } +} +)", + objrefname); + return; + } + + w.write(R"( private static WindowsRuntimeObjectReference % { @@ -2636,6 +2688,22 @@ private static WindowsRuntimeObjectReference % void write_static_objref_definition(writer& w, TypeDef const& staticsType, TypeDef const& classType) { auto objrefname = w.write_temp("%", bind(staticsType)); + if (settings.reference_projection) + { + w.write(R"( +private static WindowsRuntimeObjectReference % +{ + get + { + throw null; + } +} +)", + objrefname); + return; + } + + w.write(R"( private static WindowsRuntimeObjectReference % { @@ -4703,8 +4771,24 @@ R"(#pragma warning disable IL2026 type.TypeNamespace(), type.TypeName()); } + void write_class_winrt_classname_attribute(writer& w, TypeDef const& type) + { + if (settings.reference_projection) + { + return; + } + + w.write("[WindowsRuntimeClassName(%.RuntimeClassName)]\n", + bind(type, typedef_name_type::ABI, false)); + } + void write_comwrapper_marshaller_attribute(writer& w, TypeDef const& type) { + if (settings.reference_projection) + { + return; + } + w.write("[ABI.%.%ComWrappersMarshaller]\n", type.TypeNamespace(), type.TypeName()); } @@ -6219,19 +6303,31 @@ public override unsafe void Invoke( ReadOnlySpan additionalParameters, out void* retval) { -using WindowsRuntimeObjectReferenceValue activationFactoryValue = %.AsValue(); -void* ThisPtr = activationFactoryValue.GetThisPtrUnsafe(); - -% % } } )", callback_class, callback_class, - cache_object, - bind(write_constructor_params_as_variables, signature), - bind(invoke_target, "", is_generic, abi_marshalers, is_noexcept(method))); + bind([&](writer& w) { + if (settings.reference_projection) + { + w.write("throw null;"); + } + else + { + w.write(R"( +using WindowsRuntimeObjectReferenceValue activationFactoryValue = %.AsValue(); +void* ThisPtr = activationFactoryValue.GetThisPtrUnsafe(); + +% +% +)", + cache_object, + bind(write_constructor_params_as_variables, signature), + bind(invoke_target, "", is_generic, abi_marshalers, is_noexcept(method))); + } + })); } @@ -6291,20 +6387,31 @@ public override unsafe void Invoke( out void* innerInterface, out void* retval) { -using WindowsRuntimeObjectReferenceValue activationFactoryValue = %.AsValue(); -void* ThisPtr = activationFactoryValue.GetThisPtrUnsafe(); - -% % } } )", callback_class, callback_class, - cache_object, - bind(write_composable_constructor_params_as_variables, signature), - bind(invoke_target, "", is_generic, abi_marshalers, is_noexcept(method)) -); + bind([&](writer& w) { + if (settings.reference_projection) + { + w.write("throw null;"); + } + else + { + w.write(R"( +using WindowsRuntimeObjectReferenceValue activationFactoryValue = %.AsValue(); +void* ThisPtr = activationFactoryValue.GetThisPtrUnsafe(); + +% +% +)", + cache_object, + bind(write_composable_constructor_params_as_variables, signature), + bind(invoke_target, "", is_generic, abi_marshalers, is_noexcept(method))); + } + })); } void write_interface_members(writer& w, TypeDef const& type) @@ -8457,12 +8564,14 @@ public static nint Vtable w.write(R"( [DynamicInterfaceCastableImplementation] +% file interface % : % { % % } )", + bind(type), type.TypeName(), bind(type, typedef_name_type::Projected, false), bind(type), @@ -8614,8 +8723,7 @@ return MarshalInspectable<%>.FromAbi(thisPtr); auto gc_pressure_amount = get_gc_pressure_amount(type); w.write(R"( -%[WindowsRuntimeClassName(%.RuntimeClassName)] -%%%% %class %% +%%%%%% %class %% { % @@ -8632,7 +8740,7 @@ return MarshalInspectable<%>.FromAbi(thisPtr); } )", bind(type), - bind(type, typedef_name_type::ABI, false), + bind(type), bind(type, true), bind(type), bind(type), @@ -8908,11 +9016,19 @@ return false; { method_signature signature{ get_delegate_invoke(type) }; w.write(R"( -%%%% delegate % %(%); +%%%%% delegate % %(%); )", bind(type), bind(type, false), bind(type), + bind([&](writer& w) + { + if (settings.reference_projection) + { + write_guid_attribute(w, type); + w.write("\n"); + } + }), internal_accessibility(), bind(signature), bind(type, typedef_name_type::Projected, false), diff --git a/src/cswinrt/main.cpp b/src/cswinrt/main.cpp index ceb34c7d9..ad26c075e 100644 --- a/src/cswinrt/main.cpp +++ b/src/cswinrt/main.cpp @@ -43,6 +43,7 @@ namespace cswinrt { "public_exclusiveto", 0, 0, {}, "Make exclusiveto interfaces public in the projection (default is internal)"}, { "idic_exclusiveto", 0, 0, {}, "Make exclusiveto interfaces support IDynamicInterfaceCastable (IDIC) for RCW scenarios (default is false)"}, { "partial_factory", 0, 0, {}, "Allows to provide an additional component activation factory (default is false)"}, + { "reference_projection", 0, 0, {}, "Generates a projection to be used as a reference assembly (default is false)"}, { "help", 0, option::no_max, {}, "Show detailed help" }, { "?", 0, option::no_max, {}, {} }, }; @@ -112,6 +113,7 @@ Where is one or more of: settings.public_exclusiveto = args.exists("public_exclusiveto"); settings.idic_exclusiveto = args.exists("idic_exclusiveto"); settings.partial_factory = args.exists("partial_factory"); + settings.reference_projection = args.exists("reference_projection"); settings.input = args.files("input", database::is_database); for (auto && include : args.values("include")) @@ -251,58 +253,62 @@ Where is one or more of: writer w(ns); writer helperWriter("WinRT"); w.write_begin(); - for (auto&& [name, type] : members.types) + + if (!settings.reference_projection) { - currentType = name; - if (!settings.filter.includes(type)) { continue; } - if (distance(type.GenericParam()) != 0) { continue; } - if (auto mapping = get_mapped_type(ns, name)) + for (auto&& [name, type] : members.types) { - if (!mapping->emit_abi) + currentType = name; + if (!settings.filter.includes(type)) { continue; } + if (distance(type.GenericParam()) != 0) { continue; } + if (auto mapping = get_mapped_type(ns, name)) { - continue; + if (!mapping->emit_abi) + { + continue; + } } - } - auto guard{ w.push_generic_params(type.GenericParam()) }; - auto guard1{ helperWriter.push_generic_params(type.GenericParam()) }; + auto guard{ w.push_generic_params(type.GenericParam()) }; + auto guard1{ helperWriter.push_generic_params(type.GenericParam()) }; - switch (get_category(type)) - { - case category::class_type: - // For both static and attributes, we don't need to pass them across the ABI. - if (!is_static(type) && - !is_attribute_type(type)) - { - write_winrt_comwrappers_typemapgroup_assembly_attribute(w, type, false); - } - break; - case category::delegate_type: - write_winrt_comwrappers_typemapgroup_assembly_attribute(w, type, true); - break; - case category::enum_type: - write_winrt_comwrappers_typemapgroup_assembly_attribute(w, type, true); - break; - case category::interface_type: - write_winrt_idic_typemapgroup_assembly_attribute(w, type); - break; - case category::struct_type: - // Similarly for API contracts, we don't expect them to be passed across the ABI. - if (!is_api_contract_type(type)) + switch (get_category(type)) { + case category::class_type: + // For both static and attributes, we don't need to pass them across the ABI. + if (!is_static(type) && + !is_attribute_type(type)) + { + write_winrt_comwrappers_typemapgroup_assembly_attribute(w, type, false); + } + break; + case category::delegate_type: write_winrt_comwrappers_typemapgroup_assembly_attribute(w, type, true); + break; + case category::enum_type: + write_winrt_comwrappers_typemapgroup_assembly_attribute(w, type, true); + break; + case category::interface_type: + write_winrt_idic_typemapgroup_assembly_attribute(w, type); + break; + case category::struct_type: + // Similarly for API contracts, we don't expect them to be passed across the ABI. + if (!is_api_contract_type(type)) + { + write_winrt_comwrappers_typemapgroup_assembly_attribute(w, type, true); + } + break; } - break; } - } - // Attributes need to be written at the start, so handling this addition separately. - if (ns == "Windows.Storage.Streams" && settings.addition_filter.includes(ns)) - { - w.write(R"( + // Attributes need to be written at the start, so handling this addition separately. + if (ns == "Windows.Storage.Streams" && settings.addition_filter.includes(ns)) + { + w.write(R"( [assembly: TypeMapAssociation( typeof(global::System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBuffer), typeof(global::ABI.System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBuffer))] )"); + } } currentType = ""; @@ -370,50 +376,54 @@ Where is one or more of: if (written) { w.write_end_projected(); - w.write_begin_abi(); - for (auto&& [name, type] : members.types) + if (!settings.reference_projection) { - currentType = name; - if (!settings.filter.includes(type)) { continue; } - if (distance(type.GenericParam()) != 0) { continue; } - if (auto mapping = get_mapped_type(ns, name)) + w.write_begin_abi(); + + for (auto&& [name, type] : members.types) { - if (!mapping->emit_abi) + currentType = name; + if (!settings.filter.includes(type)) { continue; } + if (distance(type.GenericParam()) != 0) { continue; } + if (auto mapping = get_mapped_type(ns, name)) { - continue; + if (!mapping->emit_abi) + { + continue; + } } - } - if (is_api_contract_type(type)) { continue; } - if (is_attribute_type(type)) { continue; } - auto guard{ w.push_generic_params(type.GenericParam()) }; + if (is_api_contract_type(type)) { continue; } + if (is_attribute_type(type)) { continue; } + auto guard{ w.push_generic_params(type.GenericParam()) }; - switch (get_category(type)) - { - case category::class_type: - write_abi_class(w, type); - if (settings.component && componentActivatableClasses.count(type) == 1) + switch (get_category(type)) { - write_winrt_exposed_type_class(w, type, true); + case category::class_type: + write_abi_class(w, type); + if (settings.component && componentActivatableClasses.count(type) == 1) + { + write_winrt_exposed_type_class(w, type, true); + } + break; + case category::delegate_type: + write_abi_delegate(w, type); + write_temp_delegate_event_source_subclass(w, type); + break; + case category::enum_type: + write_abi_enum(w, type); + break; + case category::interface_type: + write_abi_interface(w, type); + break; + case category::struct_type: + write_abi_struct(w, type); + break; } - break; - case category::delegate_type: - write_abi_delegate(w, type); - write_temp_delegate_event_source_subclass(w, type); - break; - case category::enum_type: - write_abi_enum(w, type); - break; - case category::interface_type: - write_abi_interface(w, type); - break; - case category::struct_type: - write_abi_struct(w, type); - break; } + w.write_end_abi(); } - w.write_end_abi(); currentType = ""; @@ -544,6 +554,25 @@ ComWrappersSupport.RegisterAuthoringMetadataTypeLookup(new Func(GetM } writer ws; write_file_header(ws); + + if (std::string(string.name) == "ComInteropHelpers") + { + // Determine which COM interop helpers to include by checking whether the newer + // types used in the COM interop helpers are being projected or not. + // The ComInteropHelpers file makes use of UAC_VERSION_* to conditionally + // include the ones that are being projected. + int uapContractversion = 7; // default to 17763 + if (c.find("Windows.Graphics.Display.DisplayInformation")) + { + uapContractversion = 15; + } + + ws.write(R"( +#define UAC_VERSION_% +)", + uapContractversion); + } + ws.write(string.value); ws.flush_to_file(settings.output_folder / (std::string(string.name) + ".cs")); } diff --git a/src/cswinrt/settings.h b/src/cswinrt/settings.h index 8fd59dc73..8ef1c12ca 100644 --- a/src/cswinrt/settings.h +++ b/src/cswinrt/settings.h @@ -20,6 +20,7 @@ namespace cswinrt bool public_exclusiveto{}; bool idic_exclusiveto{}; bool partial_factory{}; + bool reference_projection{}; }; extern settings_type settings; diff --git a/src/cswinrt/strings/ComInteropHelpers.cs b/src/cswinrt/strings/ComInteropHelpers.cs index 57e15bee5..243ba978d 100644 --- a/src/cswinrt/strings/ComInteropHelpers.cs +++ b/src/cswinrt/strings/ComInteropHelpers.cs @@ -1,4 +1,4 @@ -#if UAC_VERSION_15 +#if UAC_VERSION_15 #define UAC_VERSION_14 #endif #if UAC_VERSION_14 @@ -133,11 +133,17 @@ namespace Windows.ApplicationModel.DataTransfer.DragDrop.Core [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.10240.0")] public static class DragDropManagerInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IDragDropManagerInterop); - +#endif + public static CoreDragDropManager GetForWindow(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (CoreDragDropManager) global::ABI.WinRT.Interop.IDragDropManagerInteropMethods.GetForWindow(objectReference, appWindow, global::ABI.InterfaceIIDs.IID_Windows_ApplicationModel_DataTransfer_DragDrop_Core_ICoreDragDropManager); +#endif } } #endif @@ -163,16 +169,26 @@ private static ref readonly Guid IID_IAsyncOperation_bool } } +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.Graphics.Printing.PrintManager.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IPrintManagerInterop); +#endif public static PrintManager GetForWindow(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (PrintManager) global::ABI.WinRT.Interop.IPrintManagerInteropMethods.GetForWindow(objectReference, appWindow, global::ABI.InterfaceIIDs.IID_Windows_Graphics_Printing_IPrintManager); +#endif } public static IAsyncOperation ShowPrintUIForWindowAsync(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (IAsyncOperation) global::ABI.WinRT.Interop.IPrintManagerInteropMethods.ShowPrintUIForWindowAsync(objectReference, appWindow, IID_IAsyncOperation_bool); +#endif } } #endif @@ -184,11 +200,17 @@ namespace Windows.Media [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.10240.0")] public static class SystemMediaTransportControlsInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.Media.SystemMediaTransportControls.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_ISystemMediaTransportControlsInterop); +#endif public static SystemMediaTransportControls GetForWindow(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (SystemMediaTransportControls) global::ABI.WinRT.Interop.ISystemMediaTransportControlsInteropMethods.GetForWindow(objectReference, appWindow, global::ABI.InterfaceIIDs.IID_Windows_Media_ISystemMediaTransportControls); +#endif } } #endif @@ -200,16 +222,26 @@ namespace Windows.Media.PlayTo [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.10240.0")] public static class PlayToManagerInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.Media.PlayTo.PlayToManager.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IPlayToManagerInterop); - +#endif + public static PlayToManager GetForWindow(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (PlayToManager) global::ABI.WinRT.Interop.IPlayToManagerInteropMethods.GetForWindow(objectReference, appWindow, global::ABI.InterfaceIIDs.IID_Windows_Media_PlayTo_IPlayToManager); +#endif } public static void ShowPlayToUIForWindow(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else global::ABI.WinRT.Interop.IPlayToManagerInteropMethods.ShowPlayToUIForWindow(objectReference, appWindow); +#endif } } #endif @@ -234,11 +266,17 @@ private static ref readonly Guid IID_IAsyncOperation_UserConsentVerificationResu } } +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.Security.Credentials.UI.UserConsentVerifier.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IUserConsentVerifierInterop); +#endif public static IAsyncOperation RequestVerificationForWindowAsync(IntPtr appWindow, string message) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (IAsyncOperation) global::ABI.WinRT.Interop.IUserConsentVerifierInteropMethods.RequestVerificationForWindowAsync(objectReference, appWindow, message, IID_IAsyncOperation_UserConsentVerificationResult); +#endif } } #endif @@ -263,16 +301,26 @@ private static ref readonly Guid IID_IAsyncOperation_WebTokenRequestResult } } +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IWebAuthenticationCoreManagerInterop); +#endif public static IAsyncOperation RequestTokenForWindowAsync(IntPtr appWindow, WebTokenRequest request) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (IAsyncOperation) global::ABI.WinRT.Interop.IWebAuthenticationCoreManagerInteropMethods.RequestTokenForWindowAsync(objectReference, appWindow, request, IID_IAsyncOperation_WebTokenRequestResult); +#endif } public static IAsyncOperation RequestTokenWithWebAccountForWindowAsync(IntPtr appWindow, WebTokenRequest request, WebAccount webAccount) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (IAsyncOperation) global::ABI.WinRT.Interop.IWebAuthenticationCoreManagerInteropMethods.RequestTokenWithWebAccountForWindowAsync(objectReference, appWindow, request, webAccount, IID_IAsyncOperation_WebTokenRequestResult); +#endif } } #endif @@ -284,21 +332,35 @@ namespace Windows.UI.ApplicationSettings [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.10240.0")] public static class AccountsSettingsPaneInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.UI.ApplicationSettings.AccountsSettingsPane.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IAccountsSettingsPaneInterop); +#endif public static AccountsSettingsPane GetForWindow(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (AccountsSettingsPane) global::ABI.WinRT.Interop.IAccountsSettingsPaneInteropMethods.GetForWindow(objectReference, appWindow, global::ABI.InterfaceIIDs.IID_Windows_UI_ApplicationSettings_IAccountsSettingsPane); +#endif } public static IAsyncAction ShowManageAccountsForWindowAsync(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (IAsyncAction) global::ABI.WinRT.Interop.IAccountsSettingsPaneInteropMethods.ShowManageAccountsForWindowAsync(objectReference, appWindow, global::WindowsRuntime.InteropServices.WellKnownInterfaceIIDs.IID_Windows_Foundation_IAsyncAction); +#endif } public static IAsyncAction ShowAddAccountForWindowAsync(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (IAsyncAction) global::ABI.WinRT.Interop.IAccountsSettingsPaneInteropMethods.ShowAddAccountForWindowAsync(objectReference, appWindow, global::WindowsRuntime.InteropServices.WellKnownInterfaceIIDs.IID_Windows_Foundation_IAsyncAction); +#endif } } #endif @@ -310,22 +372,34 @@ namespace Windows.UI.Input [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.14393.0")] public static class RadialControllerConfigurationInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.UI.Input.RadialControllerConfiguration.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IRadialControllerConfigurationInterop); - +#endif + public static RadialControllerConfiguration GetForWindow(IntPtr hwnd) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (RadialControllerConfiguration) global::ABI.WinRT.Interop.IRadialControllerConfigurationInteropMethods.GetForWindow(objectReference, hwnd, global::ABI.InterfaceIIDs.IID_Windows_UI_Input_IRadialControllerConfiguration); +#endif } } [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.14393.0")] public static class RadialControllerInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.UI.Input.RadialController.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IRadialControllerInterop); +#endif public static RadialController CreateForWindow(IntPtr hwnd) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (RadialController) global::ABI.WinRT.Interop.IRadialControllerInteropMethods.CreateForWindow(objectReference, hwnd, global::ABI.InterfaceIIDs.IID_Windows_UI_Input_IRadialController); +#endif } } #endif @@ -337,11 +411,17 @@ namespace Windows.UI.Input.Core [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.15063.0")] public static class RadialControllerIndependentInputSourceInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.UI.Input.Core.RadialControllerIndependentInputSource.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IRadialControllerIndependentInputSourceInterop); +#endif public static RadialControllerIndependentInputSource CreateForWindow(IntPtr hwnd) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (RadialControllerIndependentInputSource) global::ABI.WinRT.Interop.IRadialControllerIndependentInputSourceInteropMethods.CreateForWindow(objectReference, hwnd, global::ABI.InterfaceIIDs.IID_Windows_UI_Input_Core_IRadialControllerIndependentInputSource); +#endif } } #endif @@ -353,11 +433,17 @@ namespace Windows.UI.Input.Spatial [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.10586.0")] public static class SpatialInteractionManagerInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.UI.Input.Spatial.SpatialInteractionManager.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_ISpatialInteractionManagerInterop); - +#endif + public static SpatialInteractionManager GetForWindow(IntPtr window) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (SpatialInteractionManager) global::ABI.WinRT.Interop.ISpatialInteractionManagerInteropMethods.GetForWindow(objectReference, window, global::ABI.InterfaceIIDs.IID_Windows_UI_Input_Spatial_ISpatialInteractionManager); +#endif } } #endif @@ -369,22 +455,34 @@ namespace Windows.UI.ViewManagement [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.10240.0")] public static class InputPaneInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.UI.ViewManagement.InputPane.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IInputPaneInterop); +#endif public static InputPane GetForWindow(IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (InputPane) global::ABI.WinRT.Interop.IInputPaneInteropMethods.GetForWindow(objectReference, appWindow, global::ABI.InterfaceIIDs.IID_Windows_UI_ViewManagement_IInputPane); +#endif } } [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.10240.0")] public static class UIViewSettingsInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.UI.ViewManagement.UIViewSettings.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IUIViewSettingsInterop); +#endif public static UIViewSettings GetForWindow(IntPtr hwnd) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (UIViewSettings) global::ABI.WinRT.Interop.IUIViewSettingsInteropMethods.GetForWindow(objectReference, hwnd, global::ABI.InterfaceIIDs.IID_Windows_UI_ViewManagement_IUIViewSettings); +#endif } } #endif @@ -396,16 +494,26 @@ namespace Windows.Graphics.Display [global::System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.22621.0")] public static class DisplayInformationInterop { +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.Graphics.Display.DisplayInformation.RuntimeClassName, global::ABI.InterfaceIIDs.IID_WinRT_Interop_IDisplayInformationStaticsInterop); +#endif public static DisplayInformation GetForWindow(IntPtr window) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (DisplayInformation) global::ABI.WinRT.Interop.IDisplayInformationStaticsInteropMethods.GetForWindow(objectReference, window, global::ABI.InterfaceIIDs.IID_Windows_Graphics_Display_IDisplayInformation); +#endif } public static DisplayInformation GetForMonitor(IntPtr monitor) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return (DisplayInformation) global::ABI.WinRT.Interop.IDisplayInformationStaticsInteropMethods.GetForMonitor(objectReference, monitor, global::ABI.InterfaceIIDs.IID_Windows_Graphics_Display_IDisplayInformation); +#endif } } #endif @@ -430,20 +538,31 @@ private static ref readonly Guid Riid } } +#if !CSWINRT_REFERENCE_PROJECTION private static readonly global::WindowsRuntime.InteropServices.WindowsRuntimeObjectReference objectReference = global::WindowsRuntime.InteropServices.WindowsRuntimeActivationFactory.GetActivationFactory(ABI.Windows.ApplicationModel.DataTransfer.DataTransferManager.RuntimeClassName, IDataTransferManagerInteropMethods.IID); +#endif public static global::Windows.ApplicationModel.DataTransfer.DataTransferManager GetForWindow(global::System.IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else return IDataTransferManagerInteropMethods.GetForWindow(objectReference, appWindow, Riid); +#endif } public static void ShowShareUIForWindow(global::System.IntPtr appWindow) { +#if CSWINRT_REFERENCE_PROJECTION + throw null; +#else IDataTransferManagerInteropMethods.ShowShareUIForWindow(objectReference, appWindow); +#endif } } #endif +#if !CSWINRT_REFERENCE_PROJECTION internal static class IDataTransferManagerInteropMethods { internal static ref readonly Guid IID @@ -487,4 +606,5 @@ internal static unsafe void ShowShareUIForWindow(global::WindowsRuntime.InteropS global::WindowsRuntime.InteropServices.RestrictedErrorInfo.ThrowExceptionForHR((*(delegate* unmanaged[Stdcall]**)thisPtr)[4](thisPtr, appWindow)); } } +#endif } diff --git a/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.KeyTime.cs b/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.KeyTime.cs index 7756cc860..1fcbfe17c 100644 --- a/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.KeyTime.cs +++ b/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.KeyTime.cs @@ -5,7 +5,9 @@ namespace Microsoft.UI.Xaml.Media.Animation [WindowsRuntimeMetadata("Microsoft.UI")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Microsoft.UI.Xaml.Media.Animation.KeyTimeComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public readonly struct KeyTime : IEquatable { diff --git a/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.RepeatBehavior.cs b/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.RepeatBehavior.cs index 2e88be353..c7137c97e 100644 --- a/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.RepeatBehavior.cs +++ b/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.RepeatBehavior.cs @@ -5,7 +5,9 @@ namespace Microsoft.UI.Xaml.Media.Animation [WindowsRuntimeMetadata("Microsoft.UI")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Microsoft.UI.Xaml.Media.Animation.RepeatBehaviorComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public struct RepeatBehavior : IFormattable, IEquatable { diff --git a/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Media3D/Microsoft.UI.Xaml.Media.Media3D.Matrix3D.cs b/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Media3D/Microsoft.UI.Xaml.Media.Media3D.Matrix3D.cs index 68756303b..1f930c957 100644 --- a/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Media3D/Microsoft.UI.Xaml.Media.Media3D.Matrix3D.cs +++ b/src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media.Media3D/Microsoft.UI.Xaml.Media.Media3D.Matrix3D.cs @@ -5,7 +5,9 @@ namespace Microsoft.UI.Xaml.Media.Media3D [WindowsRuntimeMetadata("Microsoft.UI")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Microsoft.UI.Xaml.Media.Media3D.Matrix3DComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public struct Matrix3D : IFormattable, IEquatable { diff --git a/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.CornerRadius.cs b/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.CornerRadius.cs index 4459762ea..e4a7700de 100644 --- a/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.CornerRadius.cs +++ b/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.CornerRadius.cs @@ -5,7 +5,9 @@ namespace Microsoft.UI.Xaml [WindowsRuntimeMetadata("Microsoft.UI")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Microsoft.UI.Xaml.CornerRadiusComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public struct CornerRadius : IEquatable { diff --git a/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.Duration.cs b/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.Duration.cs index 04a704653..1fade054e 100644 --- a/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.Duration.cs +++ b/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.Duration.cs @@ -5,7 +5,9 @@ namespace Microsoft.UI.Xaml [WindowsRuntimeMetadata("Microsoft.UI")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Microsoft.UI.Xaml.DurationComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public readonly struct Duration : IEquatable { diff --git a/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.GridLength.cs b/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.GridLength.cs index aa901dabe..39bc6765c 100644 --- a/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.GridLength.cs +++ b/src/cswinrt/strings/additions/Microsoft.UI.Xaml/Microsoft.UI.Xaml.GridLength.cs @@ -5,7 +5,9 @@ namespace Microsoft.UI.Xaml [WindowsRuntimeMetadata("Microsoft.UI")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Microsoft.UI.Xaml.GridLengthComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public readonly struct GridLength : IEquatable { diff --git a/src/cswinrt/strings/additions/Windows.Storage.Streams/WindowsRuntimeBuffer.cs b/src/cswinrt/strings/additions/Windows.Storage.Streams/WindowsRuntimeBuffer.cs index 7548b40af..6d1be03c0 100644 --- a/src/cswinrt/strings/additions/Windows.Storage.Streams/WindowsRuntimeBuffer.cs +++ b/src/cswinrt/strings/additions/Windows.Storage.Streams/WindowsRuntimeBuffer.cs @@ -217,6 +217,7 @@ unsafe byte* IBufferByteAccess.Buffer } // class WindowsRuntimeBuffer } // namespace +#if !CSWINRT_REFERENCE_PROJECTION namespace ABI.System.Runtime.InteropServices.WindowsRuntime { [WindowsRuntimeClassName("Windows.Storage.Streams.IBuffer")] @@ -282,5 +283,6 @@ static WindowsRuntimeBufferInterfaceEntriesImpl() } } } +#endif // WindowsRuntimeBuffer.cs diff --git a/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Animation/Windows.UI.Xaml.Media.Animation.KeyTime.cs b/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Animation/Windows.UI.Xaml.Media.Animation.KeyTime.cs index 4d4151b0d..d046aafb1 100644 --- a/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Animation/Windows.UI.Xaml.Media.Animation.KeyTime.cs +++ b/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Animation/Windows.UI.Xaml.Media.Animation.KeyTime.cs @@ -5,7 +5,9 @@ namespace Windows.UI.Xaml.Media.Animation [WindowsRuntimeMetadata("Windows.Foundation.UniversalApiContract")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Windows.UI.Xaml.Media.Animation.KeyTimeComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public readonly struct KeyTime : IEquatable { diff --git a/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Animation/Windows.UI.Xaml.Media.Animation.RepeatBehavior.cs b/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Animation/Windows.UI.Xaml.Media.Animation.RepeatBehavior.cs index 84f04ec05..16e346d73 100644 --- a/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Animation/Windows.UI.Xaml.Media.Animation.RepeatBehavior.cs +++ b/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Animation/Windows.UI.Xaml.Media.Animation.RepeatBehavior.cs @@ -5,7 +5,9 @@ namespace Windows.UI.Xaml.Media.Animation [WindowsRuntimeMetadata("Windows.Foundation.UniversalApiContract")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Windows.UI.Xaml.Media.Animation.RepeatBehaviorComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public struct RepeatBehavior : IFormattable, IEquatable { diff --git a/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Media3D/Windows.UI.Xaml.Media.Media3D.Matrix3D.cs b/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Media3D/Windows.UI.Xaml.Media.Media3D.Matrix3D.cs index 6ce09403a..9eb295dbe 100644 --- a/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Media3D/Windows.UI.Xaml.Media.Media3D.Matrix3D.cs +++ b/src/cswinrt/strings/additions/Windows.UI.Xaml.Media.Media3D/Windows.UI.Xaml.Media.Media3D.Matrix3D.cs @@ -5,7 +5,9 @@ namespace Windows.UI.Xaml.Media.Media3D [WindowsRuntimeMetadata("Windows.Foundation.UniversalApiContract")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Windows.UI.Xaml.Media.Media3D.Matrix3DComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public struct Matrix3D : IFormattable, IEquatable { diff --git a/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.CornerRadius.cs b/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.CornerRadius.cs index d622579de..9edb460d7 100644 --- a/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.CornerRadius.cs +++ b/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.CornerRadius.cs @@ -5,7 +5,9 @@ namespace Windows.UI.Xaml [WindowsRuntimeMetadata("Windows.Foundation.UniversalApiContract")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Windows.UI.Xaml.CornerRadiusComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public struct CornerRadius : IEquatable { diff --git a/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.Duration.cs b/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.Duration.cs index 5f0545960..2e68f436c 100644 --- a/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.Duration.cs +++ b/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.Duration.cs @@ -5,7 +5,9 @@ namespace Windows.UI.Xaml [WindowsRuntimeMetadata("Windows.Foundation.UniversalApiContract")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Windows.UI.Xaml.DurationComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public readonly struct Duration : IEquatable { diff --git a/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.GridLength.cs b/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.GridLength.cs index 24dcdfb19..4bb5b6465 100644 --- a/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.GridLength.cs +++ b/src/cswinrt/strings/additions/Windows.UI.Xaml/Windows.UI.Xaml.GridLength.cs @@ -5,7 +5,9 @@ namespace Windows.UI.Xaml [WindowsRuntimeMetadata("Windows.Foundation.UniversalApiContract")] [WindowsRuntimeClassName("Windows.Foundation.IReference")] +#if !CSWINRT_REFERENCE_PROJECTION [ABI.Windows.UI.Xaml.GridLengthComWrappersMarshaller] +#endif [StructLayout(LayoutKind.Sequential)] public readonly struct GridLength : IEquatable {