Skip to content

Commit

Permalink
Enable test and fix .net 7+
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Oct 17, 2022
1 parent d5a3e77 commit 30264af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
<StartupHookSupport Condition="'$(StartupHookSupport)' == ''">false</StartupHookSupport>
<UseNativeHttpHandler Condition=" $(AndroidHttpClientHandlerType.Contains ('System.Net.Http.SocketsHttpHandler')) And '$(UseNativeHttpHandler)' == '' ">false</UseNativeHttpHandler>
<UseNativeHttpHandler Condition="'$(UseNativeHttpHandler)' == ''">true</UseNativeHttpHandler>
<_AggressiveAttributeTrimming Condition="'$(_AggressiveAttributeTrimming)' == ''">true</_AggressiveAttributeTrimming>
<NullabilityInfoContextSupport Condition="'$(NullabilityInfoContextSupport)' == ''">false</NullabilityInfoContextSupport>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,19 @@ private void PreserveCustomHttpClientHandler (string handlerType, string handler
}

[Test]
[Category ("DotNetIgnore")] // HttpClientHandler options not implemented in .NET 5+ yet
public void PreserveCustomHttpClientHandlers ()
{
PreserveCustomHttpClientHandler ("Xamarin.Android.Net.AndroidClientHandler", "",
"temp/PreserveAndroidHttpClientHandler", "android/assets/Mono.Android.dll");
PreserveCustomHttpClientHandler ("System.Net.Http.MonoWebRequestHandler", "System.Net.Http",
"temp/PreserveMonoWebRequestHandler", "android/assets/System.Net.Http.dll");
if (Builder.UseDotNet) {
PreserveCustomHttpClientHandler ("Xamarin.Android.Net.AndroidMessageHandler", "",
"temp/PreserveAndroidMessageHandler", "android-arm64/linked/Mono.Android.dll");
PreserveCustomHttpClientHandler ("System.Net.Http.SocketsHttpHandler", "System.Net.Http",
"temp/PreserveSocketsHttpHandler", "android-arm64/linked/System.Net.Http.dll");
} else {
PreserveCustomHttpClientHandler ("Xamarin.Android.Net.AndroidClientHandler", "",
"temp/PreserveAndroidHttpClientHandler", "android/assets/Mono.Android.dll");
PreserveCustomHttpClientHandler ("System.Net.Http.MonoWebRequestHandler", "System.Net.Http",
"temp/PreserveMonoWebRequestHandler", "android/assets/System.Net.Http.dll");
}
}

[Test]
Expand Down

0 comments on commit 30264af

Please sign in to comment.