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 (show other bugs)
Version: XI 8.6.0
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2015-02-16 14:56 UTC by Adam Kemp
Modified: 2015-07-21 21:27 UTC (History)
3 users (show)

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


Attachments

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 8.6.2.19 (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)

Note You need to log in before you can comment on or make changes to this bug.