Bug 27111 - NSArray, NSSet, et al. don't implement useful interfaces
Summary: NSArray, NSSet, et al. don't implement useful interfaces
Status: NEW
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 8.6.0
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Sebastien Pouliot
Depends on:
Reported: 2015-02-16 14:56 UTC by Adam Kemp
Modified: 2015-07-21 21:27 UTC (History)
3 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 for Bug 27111 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Adam Kemp 2015-02-16 14:56:11 UTC
NSArray should implement IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>.

NSMutableArray should implement the above plus IList<T>.

NSSet should implement IReadOnlyCollection<T>. Sadly there is no IReadOnlySet<T>. :(

NSMutableSet should implement ISet<T> and ICollection<T>.

NSDictionary should implement IReadOnlyDictionary<TKey, TValue>. It should _not_ implement IDictionary<TKey, TValue> or ICollection<T> (though this would be a breaking change).

NSMutableDictionary should implement IReadOnlyDictionary<TKey, TValue>.

All of these help tremendously in working with these data types in cross-platform code in an efficient way.
Comment 1 Udham Singh 2015-02-17 04:42:29 UTC
I have checked this issue and observed the reported behaviour. I’ll need confirmation from the developer if this is a bug. For now I am leaving this bug as NEW.

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

Environment Info:

Mac OS X 10.9.5
Xamarin Studio 5.7.2 (build 1)
Mono 3.12.0 ((detached/de2f33f)
GTK+ 2.24.23 (Raleigh theme)
Xcode 6.1.1 (6611)
Xamarin.iOS (Business Edition)

=== Build Information ===

Release ID: 507020001
Git revision: 103486e2547553077836a5ba20a973487b983830
Build date: 2015-02-13 11:56:36-05
Xamarin addins: 8dd5b934e86ef0595c022dd3930fd40e3376ab4c
Comment 2 Sebastien Pouliot 2015-07-21 21:27:18 UTC
Postponed to a future release (non trivial code size impact)