Skip to content

Commit

Permalink
[src] Ignore warning due to obsolete method. (#12779)
Browse files Browse the repository at this point in the history
The warning is new from .net 5 but the code is old and the change of the
method is not direct, EscapeDataString does not work as EscapeUriString.
  • Loading branch information
mandel-macaque authored Sep 21, 2021
1 parent c4a67e5 commit ae08971
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CFNetwork/CFHTTPMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ public static CFHTTPMessage CreateRequest (Uri uri, string method, Version versi
CFUrl urlRef = null;
NSString methodRef = null;

// the method is obsolete, but EscapeDataString does not work the same way. We could get the components
// of the Uri and then EscapeDataString, but this might introduce bugs, so for now we will ignore the warning
#pragma warning disable SYSLIB0001
var escaped = Uri.EscapeUriString (uri.ToString ());
#pragma warning restore SYSLIB0001

try {
urlRef = CFUrl.FromUrlString (escaped, null);
Expand Down

3 comments on commit ae08971

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ [CI Build] Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
Generator Diff (only version changes)

Packages generated

View packages

🎉 All 243 tests passed 🎉

Pipeline on Agent XAMBOT-1037.BigSur'
[src] Ignore warning due to obsolete method. (#12779)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Tests were not ran (VSTS: device tests tvOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[src] Ignore warning due to obsolete method. (#12779)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Tests were not ran (VSTS: device tests iOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[src] Ignore warning due to obsolete method. (#12779)

Please sign in to comment.