Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Handlers] Register handlers and use Microsoft.Extensions for Hosting and Dependency Injection #12460

Merged
merged 81 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
9200814
[Core,Android,iOS] Add AppBuilder and AppHost and sample and tests
rmarinho Oct 7, 2020
59f3256
[eng] Add script to measure android startup
rmarinho Oct 20, 2020
c69296d
Update src/Platform.Handlers/tests/Xamarin.Platform.Handlers.Benchmar…
rmarinho Oct 26, 2020
9fa4775
[Sample ] Update sample code
rmarinho Feb 1, 2021
fbf9009
[Tests] Fix hosting tests
rmarinho Feb 2, 2021
5800323
Small cleanup
rmarinho Feb 2, 2021
d90dcfe
[handlers] Add Window and cleanup hosting
rmarinho Feb 2, 2021
b25e9bd
[Controls] Remove xf button
rmarinho Feb 2, 2021
718e4f5
[Hosting] Remove AppLifetiem for now
rmarinho Feb 3, 2021
1c6d539
Fix sample code
rmarinho Feb 3, 2021
347e8e2
[Build] Fix rebase
rmarinho Feb 12, 2021
b7cfdbf
[Test] Fix test
rmarinho Feb 12, 2021
8917cea
[Build] Remove reference to http package
rmarinho Feb 12, 2021
64a38a8
[Handlers] Rework Hosting, add option to override ServiceCollection a…
rmarinho Feb 13, 2021
741792d
[Hosting] Refactor to use extensions and rename some Stubs
rmarinho Feb 15, 2021
a3ee376
[Hosting] Small refactor
rmarinho Feb 16, 2021
81279f0
[Hosting] Fix null reference usage on .net6
rmarinho Feb 17, 2021
33f8772
[Samples] Install DI extension package on net6 samples
rmarinho Feb 17, 2021
b3d8988
[Sample] Add Maui.Controls.Sample
rmarinho Feb 18, 2021
9ae5414
Fix props
rmarinho Feb 18, 2021
0ca75cc
[Sample] Fix sample move to Shared folder
rmarinho Feb 18, 2021
00ab6a3
Revert "[Sample] Fix sample move to Shared folder"
rmarinho Feb 18, 2021
1317d3a
Revert "Fix props"
rmarinho Feb 18, 2021
8939300
Revert "[Sample] Add Maui.Controls.Sample"
rmarinho Feb 18, 2021
2554c36
[Hosting] Add Configuration support
rmarinho Feb 19, 2021
a7c879e
[Hosting]Add Maui.Controls sample
rmarinho Feb 19, 2021
ac05567
[Hosting]Fix sln
rmarinho Feb 19, 2021
b82c69d
[Hosting] Add net6 Maui.Controls.Sample
rmarinho Feb 19, 2021
e7c0b73
Cleanup
rmarinho Feb 19, 2021
d6fffea
More cleanup
rmarinho Feb 19, 2021
a161982
Implement iAPP on old sample
rmarinho Feb 19, 2021
9fcfd20
[Hosting] Fix build
rmarinho Feb 19, 2021
6a210e6
[Hosting] Just use forms on sample , add GetWindow to IApp
rmarinho Feb 19, 2021
a845237
[Hosting] Add HandlersContext to App
rmarinho Feb 19, 2021
a760d78
[Hosting] Add MauiAppCompatActivity
rmarinho Feb 19, 2021
de31e14
[Hosting] Move HandlersContext to Window
rmarinho Feb 19, 2021
a3c6c9f
Remove extra files
rmarinho Feb 20, 2021
37fe1c7
[Hosting] Add MauiApp
rmarinho Feb 20, 2021
ff03b38
Fix build
rmarinho Feb 20, 2021
95e0c4b
Update Maui.Controls.Sample.iOS-net6.csproj
rmarinho Feb 20, 2021
906ef34
Update AssemblyInfo.cs
rmarinho Feb 20, 2021
e4a321a
Update Maui.Controls.Sample-net6.csproj
rmarinho Feb 20, 2021
2e0045a
[Hosting] Be able to run old and new registrar
rmarinho Feb 20, 2021
6f850ed
Add Android resources
rmarinho Feb 20, 2021
02c14d1
[Android] Add xml resources
rmarinho Feb 20, 2021
60ef221
Fix
rmarinho Feb 20, 2021
2103580
Fix unit tests
rmarinho Feb 20, 2021
b6d4bd7
[Application] Fix net6 nre
rmarinho Feb 20, 2021
3ed4f52
Cleanuo
rmarinho Feb 20, 2021
1580139
Fix build again
rmarinho Feb 20, 2021
d8f78a2
[Samples] Add essentials init
rmarinho Feb 22, 2021
0e6e21f
Fix net6 build
rmarinho Feb 22, 2021
58abfa4
- update packagese
PureWeen Feb 22, 2021
15d4825
- add handler renderer shim
PureWeen Feb 22, 2021
f947923
- fix link references
PureWeen Feb 22, 2021
44f7899
Fix running app on Android
rmarinho Feb 22, 2021
be81b2f
- fix missing using
PureWeen Feb 22, 2021
17947ae
- shim sample
PureWeen Feb 22, 2021
2222012
- add another helper
PureWeen Feb 22, 2021
32c98d7
[Hosting] Save context on App for now
rmarinho Feb 22, 2021
821ef89
[Handlers] Fix sample register ISwitch
rmarinho Feb 22, 2021
7ec45d3
[Hosting] Some renaming
rmarinho Feb 22, 2021
cc9912d
- delete samples
PureWeen Feb 22, 2021
8b6d82d
- fix CG
PureWeen Feb 22, 2021
3c1f22d
[Hosting] Remove old registrar code
rmarinho Feb 22, 2021
292c08a
Remove FormsHandlers
rmarinho Feb 22, 2021
ccf4c88
TODO: Implement legacy attribute scanner with AppHostBuilder
rmarinho Feb 22, 2021
ddbc51a
Fix build
rmarinho Feb 23, 2021
480744f
Enable nullable
rmarinho Feb 23, 2021
6ddf217
fix formatting
rmarinho Feb 23, 2021
23b3ea7
Fix using old registrar
rmarinho Feb 23, 2021
709eee2
use c# 9
rmarinho Feb 23, 2021
032a06f
Try fix #nullable
rmarinho Feb 23, 2021
8cf455b
Don't disable nullable warnings
mattleibow Feb 23, 2021
45282f0
Fixed the benchmarks and tests with new code
mattleibow Feb 23, 2021
45bd4ad
Fixing some merge issues
mattleibow Feb 23, 2021
f549b01
Remove usage of FormsHandlers
rmarinho Feb 23, 2021
508264b
[Hosting] Small refactor , fixing same names
rmarinho Feb 23, 2021
fa42f76
remove this
mattleibow Feb 23, 2021
e173929
Merge branch 'handlers-di' of https://github.com/xamarin/xamarin.form…
rmarinho Feb 23, 2021
38a20f9
[Hosting] Fix MauiHandlersServiceProvider
rmarinho Feb 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .nuspec/Xamarin.Forms.MultiTargeting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,23 @@
<None Include="**\Win32\*.cs" />
</ItemGroup>

<PropertyGroup>
<!-- Android -->
<AndroidProjectFolder>Platform\Android\</AndroidProjectFolder>
<MonoAndroidResourcePrefix>$(AndroidProjectFolder)Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>$(AndroidProjectFolder)Assets</MonoAndroidAssetsPrefix>
</PropertyGroup>

<!-- Android -->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-android'))">
<DefineConstants>$(DefineConstants);MONOANDROID</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('MonoAndroid')) == true OR $(TargetFramework.StartsWith('net6.0-android')) == true ">
<AndroidResource Include="$(MonoAndroidResourcePrefix)\*\*.xml" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\*\*.axml" />
</ItemGroup>

<!-- iOS -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0-ios' ">
<DefineConstants>$(DefineConstants);IOS</DefineConstants>
Expand Down
51 changes: 32 additions & 19 deletions Maui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ VisualStudioVersion = 16.0.30926.220
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Platform.Handlers-net6", "src\Platform.Handlers\src\Xamarin.Platform.Handlers\Xamarin.Platform.Handlers-net6.csproj", "{95BA42B5-B00E-4986-B9B5-517140378452}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample-net6", "src\Platform.Handlers\samples\Sample\Sample-net6.csproj", "{31D405F0-723E-4A6C-A52B-F4CB19A8D845}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{449F6071-A74F-4309-8D7B-7038CFD1B17B}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
Expand All @@ -15,14 +13,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{449F6071
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Forms.Core-net6", "src\Forms\src\Xamarin.Forms.Core\Xamarin.Forms.Core-net6.csproj", "{AF64451F-E2BD-41C2-B083-F60C26AE2A9F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Droid-net6", "src\Platform.Handlers\samples\Sample.Droid\Sample.Droid-net6.csproj", "{3AE5B968-1916-4213-97E4-F88F51BCAB23}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.iOS-net6", "src\Platform.Handlers\samples\Sample.iOS\Sample.iOS-net6.csproj", "{B8D80A2B-F636-4E27-BCAA-EA601007B7F4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Maui.Controls.Compatibility-net6", "src\Platform.Renderers\src\Maui.Controls.Compatibility\Maui.Controls.Compatibility-net6.csproj", "{00A11C2F-969F-4964-8557-91ADF4B1523D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Forms.Platform.Android.FormsViewGroup-net6", "src\Platform.Renderers\src\Xamarin.Forms.Platform.Android.FormsViewGroup\Xamarin.Forms.Platform.Android.FormsViewGroup-net6.csproj", "{EB956381-F3E6-437C-9069-36B8BF5C6E2F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Maui.Controls", "Maui.Controls", "{459BF674-83CB-46F6-881F-A2D2117DBF4D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E1082E26-D700-4127-9329-66D673FD2D55}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Maui.Controls.Sample-net6", "src\Forms\samples\Maui.Controls.Sample\Maui.Controls.Sample-net6.csproj", "{B8DC1324-977C-46F1-B697-9064ADE6099A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Maui.Controls.Sample.Droid-net6", "src\Forms\samples\Maui.Controls.Sample.Droid\Maui.Controls.Sample.Droid-net6.csproj", "{BE50FAEF-4096-48B5-B9CE-EE0C38F15A18}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Maui.Controls.Sample.iOS-net6", "src\Forms\samples\Maui.Controls.Sample.iOS\Maui.Controls.Sample.iOS-net6.csproj", "{1C3439E6-73D7-4F8E-A64A-5448F5CB18DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,23 +37,10 @@ Global
{95BA42B5-B00E-4986-B9B5-517140378452}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95BA42B5-B00E-4986-B9B5-517140378452}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95BA42B5-B00E-4986-B9B5-517140378452}.Release|Any CPU.Build.0 = Release|Any CPU
{31D405F0-723E-4A6C-A52B-F4CB19A8D845}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31D405F0-723E-4A6C-A52B-F4CB19A8D845}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31D405F0-723E-4A6C-A52B-F4CB19A8D845}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31D405F0-723E-4A6C-A52B-F4CB19A8D845}.Release|Any CPU.Build.0 = Release|Any CPU
{AF64451F-E2BD-41C2-B083-F60C26AE2A9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF64451F-E2BD-41C2-B083-F60C26AE2A9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF64451F-E2BD-41C2-B083-F60C26AE2A9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF64451F-E2BD-41C2-B083-F60C26AE2A9F}.Release|Any CPU.Build.0 = Release|Any CPU
{3AE5B968-1916-4213-97E4-F88F51BCAB23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AE5B968-1916-4213-97E4-F88F51BCAB23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AE5B968-1916-4213-97E4-F88F51BCAB23}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{3AE5B968-1916-4213-97E4-F88F51BCAB23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AE5B968-1916-4213-97E4-F88F51BCAB23}.Release|Any CPU.Build.0 = Release|Any CPU
{B8D80A2B-F636-4E27-BCAA-EA601007B7F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8D80A2B-F636-4E27-BCAA-EA601007B7F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8D80A2B-F636-4E27-BCAA-EA601007B7F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8D80A2B-F636-4E27-BCAA-EA601007B7F4}.Release|Any CPU.Build.0 = Release|Any CPU
{00A11C2F-969F-4964-8557-91ADF4B1523D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00A11C2F-969F-4964-8557-91ADF4B1523D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00A11C2F-969F-4964-8557-91ADF4B1523D}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -58,10 +49,32 @@ Global
{EB956381-F3E6-437C-9069-36B8BF5C6E2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB956381-F3E6-437C-9069-36B8BF5C6E2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB956381-F3E6-437C-9069-36B8BF5C6E2F}.Release|Any CPU.Build.0 = Release|Any CPU
{B8DC1324-977C-46F1-B697-9064ADE6099A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8DC1324-977C-46F1-B697-9064ADE6099A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8DC1324-977C-46F1-B697-9064ADE6099A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8DC1324-977C-46F1-B697-9064ADE6099A}.Release|Any CPU.Build.0 = Release|Any CPU
{BE50FAEF-4096-48B5-B9CE-EE0C38F15A18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE50FAEF-4096-48B5-B9CE-EE0C38F15A18}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE50FAEF-4096-48B5-B9CE-EE0C38F15A18}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{BE50FAEF-4096-48B5-B9CE-EE0C38F15A18}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE50FAEF-4096-48B5-B9CE-EE0C38F15A18}.Release|Any CPU.Build.0 = Release|Any CPU
{1C3439E6-73D7-4F8E-A64A-5448F5CB18DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C3439E6-73D7-4F8E-A64A-5448F5CB18DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C3439E6-73D7-4F8E-A64A-5448F5CB18DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C3439E6-73D7-4F8E-A64A-5448F5CB18DE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{AF64451F-E2BD-41C2-B083-F60C26AE2A9F} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
{00A11C2F-969F-4964-8557-91ADF4B1523D} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
{EB956381-F3E6-437C-9069-36B8BF5C6E2F} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
{E1082E26-D700-4127-9329-66D673FD2D55} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
{B8DC1324-977C-46F1-B697-9064ADE6099A} = {E1082E26-D700-4127-9329-66D673FD2D55}
{BE50FAEF-4096-48B5-B9CE-EE0C38F15A18} = {E1082E26-D700-4127-9329-66D673FD2D55}
{1C3439E6-73D7-4F8E-A64A-5448F5CB18DE} = {E1082E26-D700-4127-9329-66D673FD2D55}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B8ABEAD-D2B5-4370-A187-62B5ABE4EE50}
EndGlobalSection
Expand Down
4 changes: 2 additions & 2 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear/>
<clear />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" protocolVersion="3" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" protocolVersion="3" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
Expand Down
Loading