Bug 30500 - Foundation.NSUrl.Port is not bound
Summary: Foundation.NSUrl.Port is not bound
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: PC Mac OS
: High normal
Target Milestone: 2.10.0 (C8)
Assignee: Timothy Risi
Depends on:
Reported: 2015-05-27 10:56 UTC by Aaron Bockover [MSFT]
Modified: 2016-08-24 13:19 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Aaron Bockover [MSFT] 2015-05-27 10:56:52 UTC
For neither iOS nor Mac.

@property (readonly, copy) NSNumber *port;

This should probably be bound as a ushort or something in our API.
Comment 1 Miguel de Icaza [MSFT] 2015-05-27 12:45:49 UTC
The value can return null.

And it is possible that some protocol handlers might have ports beyond 16 bits.

If we decide to go with a value type, it would not hurt to use int as the return, in .NET the value -1 is used to indicate that the value does not exist.
Comment 3 Chris Hamons 2016-08-19 20:25:43 UTC
Tim fixed this back in 

Author: Timothy Risi <timothy.risi@xamarin.com>
Date:   Mon Jun 20 11:49:35 2016 -0800

but never closed the bug.

This made C8/XCode8.
Comment 4 Parmendra Kumar 2016-08-24 13:19:35 UTC
I have checked this issue with latest C8 build and observed that this issue is working fine.

Screencast: http://www.screencast.com/t/9xOSbmaaq

Hence closing this issue.

Xamarin Studio Enterprise  6.1 (build 5365)
Mono 4.6.0 (mono-4.6.0-branch/23c6a4d) (64-bit)
Xcode 7.3.1 (10188.1)
Xamarin.Mac : (Xamarin Enterprise)
Xamarin.iOS : (Xamarin Enterprise)
Xamarin.Android : (Xamarin Enterprise)
Mac OS X 10.11.5