-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scenario with set only property declared across projections (#981)
* Fix getter interface type * Adjust for netstandard compat. * Add test projection with a set property that references a get property from another projection. * Add remaining test
- Loading branch information
1 parent
a9a8631
commit 26943b2
Showing
11 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;net5.0;net6.0</TargetFrameworks> | ||
<Platforms>x64;x86</Platforms> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Tests\TestComponentCSharp\TestComponentCSharp.vcxproj" /> | ||
<ProjectReference Include="..\..\TestWinRT\TestComponent\TestComponent.vcxproj" /> | ||
<ProjectReference Include="..\..\TestWinRT\test_component_base\test_component_base.vcxproj" /> | ||
<ProjectReference Include="..\..\TestWinRT\test_component_derived\test_component_derived.vcxproj" /> | ||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" /> | ||
<ProjectReference Include="..\..\WinRT.Runtime\WinRT.Runtime.csproj" /> | ||
<ProjectReference Include="..\..\cswinrt\cswinrt.vcxproj" /> | ||
<ProjectReference Include="..\Windows\Windows.csproj" /> | ||
<ProjectReference Include="..\WinUI\WinUI.csproj" /> | ||
<ProjectReference Include="..\Test\Test.csproj" /> | ||
<InternalsVisibleTo Include="UnitTest" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<CsWinRTIncludes>TestComponentCSharp.AnotherAssembly;</CsWinRTIncludes> | ||
<!--PkgMicrosoft_WinUI is set in in obj\*.csproj.nuget.g.props with TargetFramework condition, doesn't support multi-targeting--> | ||
<PkgMicrosoft_WinUI Condition="'$(PkgMicrosoft_WinUI)'==''">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.winui', '$(MicrosoftWinUIVersion)'))</PkgMicrosoft_WinUI> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<!--Explicitly reference WinUI winmds from TFM uap10.0--> | ||
<CsWinRTInputs Include="$(PkgMicrosoft_WinUI)/**/*.winmd" /> | ||
</ItemGroup> | ||
|
||
</Project> |
16 changes: 16 additions & 0 deletions
16
src/Tests/TestComponentCSharp/AnotherAssembly.SetPropertyClass.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "pch.h" | ||
#include "AnotherAssembly.SetPropertyClass.h" | ||
#include "AnotherAssembly.SetPropertyClass.g.cpp" | ||
|
||
namespace winrt::TestComponentCSharp::AnotherAssembly::implementation | ||
{ | ||
void SetPropertyClass::ReadWriteProperty(int32_t value) | ||
{ | ||
readWriteValue = value; | ||
} | ||
|
||
int32_t SetPropertyClass::ReadWriteProperty() | ||
{ | ||
return readWriteValue; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Tests/TestComponentCSharp/AnotherAssembly.SetPropertyClass.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
#include "AnotherAssembly.SetPropertyClass.g.h" | ||
|
||
namespace winrt::TestComponentCSharp::AnotherAssembly::implementation | ||
{ | ||
struct SetPropertyClass : SetPropertyClassT<SetPropertyClass> | ||
{ | ||
SetPropertyClass() = default; | ||
|
||
void ReadWriteProperty(int32_t value); | ||
int32_t ReadWriteProperty(); | ||
|
||
int32_t readWriteValue; | ||
}; | ||
} | ||
namespace winrt::TestComponentCSharp::AnotherAssembly::factory_implementation | ||
{ | ||
struct SetPropertyClass : SetPropertyClassT<SetPropertyClass, implementation::SetPropertyClass> | ||
{ | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters