Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ObjCRuntime/ObsoleteConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ partial class Constants {

internal const string RemovedFromChip = "This API has been removed from the 'CHIP' framework.";

internal const string BrokenBinding = "This API was incorrectly bound and does not work correctly. Use the new version indicated in the associated Obsolete attribute.";

}
}
28 changes: 25 additions & 3 deletions src/carplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,23 @@ interface CPListItem : CPSelectableListItem, NSSecureCoding {
[DisableDefaultCtor]
interface CPListSection : NSSecureCoding {

[Export ("initWithItems:header:sectionIndexTitle:")]
#if !XAMCORE_5_0
[Wrap ("base (true ? throw new InvalidOperationException (Constants.BrokenBinding) : NSObjectFlag.Empty)")]
[Obsolete ("Use '.ctor (ICPListTemplateItem [], string, string)' constructor instead. Warning: this will throw InvalidOperationException at runtime.")]
NativeHandle Constructor (CPListItem [] items, [NullAllowed] string header, [NullAllowed] string sectionIndexTitle);
#endif

[Export ("initWithItems:")]
#if !XAMCORE_5_0
[Wrap ("base (true ? throw new InvalidOperationException (Constants.BrokenBinding) : NSObjectFlag.Empty)")]
[Obsolete ("Use '.ctor (ICPListTemplateItem [], string, string)' constructor instead. Warning: this will throw InvalidOperationException at runtime.")]
NativeHandle Constructor (CPListItem [] items);
#endif

[Export ("initWithItems:header:sectionIndexTitle:")]
NativeHandle Constructor (ICPListTemplateItem [] items, [NullAllowed] string header, [NullAllowed] string sectionIndexTitle);
Comment thread
janwiebe-jump marked this conversation as resolved.

[Export ("initWithItems:")]
NativeHandle Constructor (ICPListTemplateItem [] items);
Comment thread
janwiebe-jump marked this conversation as resolved.

[iOS (15,0), MacCatalyst (15,0)]
[Export ("initWithItems:header:headerSubtitle:headerImage:headerButton:sectionIndexTitle:")]
Expand All @@ -588,8 +600,18 @@ interface CPListSection : NSSecureCoding {
[NullAllowed, Export ("sectionIndexTitle")]
string SectionIndexTitle { get; }

[Export ("items", ArgumentSemantic.Copy)]
#if !XAMCORE_5_0
[Wrap ("true ? throw new InvalidOperationException (Constants.BrokenBinding) : new NSArray ()", IsVirtual = true)]
[Obsolete ("Use 'Items2 : ICPListTemplateItem []' instead.")]
CPListItem [] Items { get; }
#endif

[Export ("items", ArgumentSemantic.Copy)]
#if !XAMCORE_5_0
ICPListTemplateItem [] Items2 { get; }
#else
ICPListTemplateItem [] Items { get; }
#endif

[iOS (14,0)]
[Export ("indexOfItem:")]
Expand Down