Skip to content

Commit

Permalink
[Foundation] Fix compiler warnings in NSUrlSessionHandler. (#5032)
Browse files Browse the repository at this point in the history
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.'
  • Loading branch information
rolfbjarne authored Oct 24, 2018
1 parent ad67a39 commit 0ddc355
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Foundation/NSUrlSessionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public NSUrlSessionHandler () : this (NSUrlSessionConfiguration.DefaultSessionCo
{
}

[CLSCompliant (false)]
public NSUrlSessionHandler (NSUrlSessionConfiguration configuration)
{
if (configuration == null)
Expand All @@ -86,7 +87,7 @@ public NSUrlSessionHandler (NSUrlSessionConfiguration configuration)
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<NSUrlSessionTask, InflightData> ();
}

Expand Down

2 comments on commit 0ddc355

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build was (probably) aborted

🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Test run' 🔥 : hudson.AbortException: script returned exit code 2

Build succeeded
API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
Generator Diff (no change)
🔥 Test run failed 🔥

Test results

7 tests failed, 0 tests skipped, 219 tests passed.

Failed tests

  • System.Xml/watchOS - simulator/Debug: Crashed
  • System.Xml.Linq/watchOS - simulator/Debug: Crashed
  • Mono.Data.Sqlite/watchOS - simulator/Debug: Crashed
  • System.IO.Compression/watchOS - simulator/Debug: Crashed
  • System.IO.Compression.FileSystem/watchOS - simulator/Debug: Crashed
  • System.Security/watchOS - simulator/Debug: Crashed
  • dont link/watchOS - simulator/Debug: Crashed

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenkins job (on internal Jenkins) succeeded

Build succeeded
API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
Generator Diff (no change)
Test run succeeded

Please sign in to comment.