Skip to content

Commit b5e4bb8

Browse files
authored
[Foundation] Fix a CA1416 warning in RuntimeOptions.cs due to recent changes. (#22883)
1 parent d8d7697 commit b5e4bb8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ObjCRuntime/RuntimeOptions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ internal static HttpMessageHandler GetHttpMessageHandler ()
2222
if (Runtime.UseNSUrlSessionHandler)
2323
return new NSUrlSessionHandler ();
2424

25-
if (Runtime.UseCFNetworkHandler)
25+
if (Runtime.UseCFNetworkHandler) {
26+
#pragma warning disable CA1422 // This call site is reachable on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later, 'macOS/OSX' 12.0 and later, 'tvos' 12.2 and later. 'CFNetworkHandler' is obsoleted on: 'ios' all versions, 'maccatalyst' all versions, 'macOS/OSX' all versions, 'tvos' all versions.
2627
return new CFNetworkHandler ();
28+
#pragma warning restore CA1422
29+
}
2730

2831
return new HttpClientHandler ();
2932
}

0 commit comments

Comments
 (0)