From 0ddc3553d3ef56163734c60b0f3e082a702a08c4 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 24 Oct 2018 07:54:50 +0200 Subject: [PATCH] [Foundation] Fix compiler warnings in NSUrlSessionHandler. (#5032) Fix these warnings: src/Foundation/NSUrlSessionHandler.cs(71,57): warning CS3001: Argument type 'NSUrlSessionConfiguration' is not CLS-compliant src/Foundation/NSUrlSessionHandler.cs(89,14): warning CS0618: 'NSUrlSession.FromConfiguration(NSUrlSessionConfiguration, NSUrlSessionDelegate, NSOperationQueue)' is obsolete: 'Use the overload with a 'INSUrlSessionDelegate' parameter.' --- src/Foundation/NSUrlSessionHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Foundation/NSUrlSessionHandler.cs b/src/Foundation/NSUrlSessionHandler.cs index 415d6324d5..3dd531173f 100644 --- a/src/Foundation/NSUrlSessionHandler.cs +++ b/src/Foundation/NSUrlSessionHandler.cs @@ -68,6 +68,7 @@ namespace Foundation { { } + [CLSCompliant (false)] public NSUrlSessionHandler (NSUrlSessionConfiguration configuration) { if (configuration == null) @@ -86,7 +87,7 @@ namespace Foundation { else if ((sp & SecurityProtocolType.Tls12) != 0) configuration.TLSMinimumSupportedProtocol = SslProtocol.Tls_1_2; - session = NSUrlSession.FromConfiguration (configuration, new NSUrlSessionHandlerDelegate (this), null); + session = NSUrlSession.FromConfiguration (configuration, (INSUrlSessionDelegate) new NSUrlSessionHandlerDelegate (this), null); inflightRequests = new Dictionary (); }