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/PassKit/PKEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,12 @@ public enum PKPaymentButtonType : long {
[Mac (12,0), iOS (15,0), Watch (8,0)]
Continue = 16,
#if !NET
#pragma warning disable 0618 // warning CS0618: 'PKPaymentButtonType.[field]' is obsolete: 'Use '[replacement]'.'
[iOS (12,0)]
Book2 = Checkout,
[iOS (12,0)]
Checkout2 = Book,
#pragma warning restore
#endif // !NET
}

Expand Down
24 changes: 22 additions & 2 deletions src/appkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5338,22 +5338,30 @@ interface NSController : NSCoding, NSEditorRegistration
, NSEditor // Conflict over if CommitEditing is a property or a method. NSViewController has it right so can't "fix" NSEditor to match existing API
#endif
{
#pragma warning disable 0108 // warning CS0108: 'NSController.DiscardEditing()' hides inherited member 'NSEditor.DiscardEditing()'. Use the new keyword if hiding was intended.
[Export ("discardEditing")]
void DiscardEditing ();
#pragma warning restore

[Export ("commitEditingWithDelegate:didCommitSelector:contextInfo:")]
#if NET
#pragma warning disable 0108 // warning CS0108: 'NSController.CommitEditing(NSObject, Selector, nint)' hides inherited member 'NSEditor.CommitEditing(NSObject, Selector, nint)'. Use the new keyword if hiding was intended.
void CommitEditing ([NullAllowed] NSObject delegate1, [NullAllowed] Selector didCommitSelector, IntPtr contextInfo);
#pragma warning restore
#else
void CommitEditingWithDelegate ([NullAllowed] NSObject delegate1, [NullAllowed] Selector didCommitSelector, IntPtr contextInfo);
#endif

#if NET
#pragma warning disable 0108 // warning CS0108: 'NSController.ObjectDidBeginEditing(INSEditor)' hides inherited member 'NSEditorRegistration.ObjectDidBeginEditing(INSEditor)'. Use the new keyword if hiding was intended.
[Export ("objectDidBeginEditing:")]
void ObjectDidBeginEditing (INSEditor editor);
#pragma warning restore

#pragma warning disable 0108 // warning CS0108: 'NSController.ObjectDidEndEditing(INSEditor)' hides inherited member 'NSEditorRegistration.ObjectDidEndEditing(INSEditor)'. Use the new keyword if hiding was intended.
[Export ("objectDidEndEditing:")]
void ObjectDidEndEditing (INSEditor editor);
#pragma warning restore
#else
[Export ("objectDidBeginEditing:")]
void ObjectDidBeginEditing (NSObject editor);
Expand All @@ -5364,7 +5372,9 @@ interface NSController : NSCoding, NSEditorRegistration

[Export ("commitEditing")]
#if NET
#pragma warning disable 0108 // warning CS0108: 'NSController.CommitEditing()' hides inherited member 'NSEditor.CommitEditing()'. Use the new keyword if hiding was intended.
bool CommitEditing ();
#pragma warning restore
#else
bool CommitEditing { get; }
#endif
Expand Down Expand Up @@ -5970,8 +5980,10 @@ partial interface NSDocument : NSUserActivityRestoring {
// Found in NSUserInterfaceValidations protocol with INSValidatedUserInterfaceItem param but bound originally with NSObject
// Adding protocol gave warning 0108 which is unfixable without API break
#if NET
#pragma warning disable 0108 // warning CS0108: 'NSDocument.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)' hides inherited member 'NSUserInterfaceValidations.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)'. Use the new keyword if hiding was intended.
[Export ("validateUserInterfaceItem:")]
bool ValidateUserInterfaceItem (INSValidatedUserInterfaceItem anItem);
#pragma warning restore
#else
[Export ("validateUserInterfaceItem:")]
bool ValidateUserInterfaceItem (NSObject /* must implement NSValidatedUserInterfaceItem */ anItem);
Expand Down Expand Up @@ -6110,7 +6122,7 @@ partial interface NSDocument : NSUserActivityRestoring {
// Should be removed but radar://42781537 - Classes fail to conformsToProtocol despite header declaration
[Mac (10,10)]
[Export ("restoreUserActivityState:")]
void RestoreUserActivityState (NSUserActivity userActivity);
new void RestoreUserActivityState (NSUserActivity userActivity);
#endif

[Mac (10,12)]
Expand Down Expand Up @@ -6256,8 +6268,10 @@ partial interface NSDocumentController : NSWindowRestoration, NSCoding {
// Found in NSUserInterfaceValidations protocol with INSValidatedUserInterfaceItem param but bound originally with NSObject
// Adding protocol gave warning 0108 which is unfixable without API break
#if NET
#pragma warning disable 0108 // warning CS0108: 'NSDocumentController.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)' hides inherited member 'NSUserInterfaceValidations.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)'. Use the new keyword if hiding was intended.
[Export ("validateUserInterfaceItem:")]
bool ValidateUserInterfaceItem (INSValidatedUserInterfaceItem anItem);
#pragma warning restore
#else
[Export ("validateUserInterfaceItem:")]
bool ValidateUserInterfaceItem (NSObject /* must implement NSValidatedUserInterfaceItem */ anItem);
Expand Down Expand Up @@ -13125,7 +13139,7 @@ partial interface NSResponder : NSCoding, NSTouchBarProvider , NSUserActivityRes
// Should be removed but radar://42781537 - Classes fail to conformsToProtocol despite header declaration
[Mac (10,10)]
[Export ("restoreUserActivityState:")]
void RestoreUserActivityState (NSUserActivity userActivity);
new void RestoreUserActivityState (NSUserActivity userActivity);
#endif

[Mac (10,10,3)]
Expand Down Expand Up @@ -19496,11 +19510,15 @@ partial interface NSTextView : NSTextInputClient, NSTextLayoutOrientationProvide
[Protocolize]
NSTextViewDelegate Delegate { get; set; }

#pragma warning disable 0109 // warning CS0109: The member 'NSTextView.Editable' does not hide an accessible member. The new keyword is not required.
[Export ("editable")]
new bool Editable { [Bind ("isEditable")]get; set; }
#pragma warning restore

#pragma warning disable 0109 // warning CS0109: The member 'NSTextView.Selectable' does not hide an accessible member. The new keyword is not required.
[Export ("selectable")]
new bool Selectable { [Bind ("isSelectable")]get; set; }
#pragma warning restore

[Export ("richText")]
bool RichText { [Bind ("isRichText")]get; set; }
Expand Down Expand Up @@ -27477,8 +27495,10 @@ interface NSFontAssetRequest : INSProgressReporting
[Export ("downloadedFontDescriptors", ArgumentSemantic.Copy)]
NSFontDescriptor[] DownloadedFontDescriptors { get; }

#pragma warning disable 0108 // warning CS0108: 'NSFontAssetRequest.Progress' hides inherited member 'NSProgressReporting.Progress'. Use the new keyword if hiding was intended.
[Export ("progress", ArgumentSemantic.Strong)]
NSProgress Progress { get; }
#pragma warning restore

[Export ("downloadFontAssetsWithCompletionHandler:")]
void DownloadFontAssets (DownloadFontAssetsRequestCompletionHandler completionHandler);
Expand Down
10 changes: 10 additions & 0 deletions src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4924,11 +4924,15 @@ interface AVSampleCursor : NSCopying {
[return: Release]
CMFormatDescription CopyCurrentSampleFormatDescription ();

#pragma warning disable 0618 // warning CS0618: 'AVSampleCursorSyncInfo' is obsolete: 'This API is not available on this platform.'
[Export ("currentSampleSyncInfo")]
AVSampleCursorSyncInfo CurrentSampleSyncInfo { get; }
#pragma warning restore

#pragma warning disable 0618 // warning CS0618: 'AVSampleCursorSyncInfo' is obsolete: 'This API is not available on this platform.'
[Export ("currentSampleDependencyInfo")]
AVSampleCursorSyncInfo CurrentSampleDependencyInfo { get; }
#pragma warning restore

[Mac (10,11)]
[Export ("samplesRequiredForDecoderRefresh")]
Expand All @@ -4938,17 +4942,23 @@ interface AVSampleCursor : NSCopying {
[Export ("currentChunkStorageURL")]
NSUrl CurrentChunkStorageUrl { get; }

#pragma warning disable 0618 // warning CS0618: 'AVSampleCursorStorageRange' is obsolete: 'This API is not available on this platform.'
[Export ("currentChunkStorageRange")]
AVSampleCursorStorageRange CurrentChunkStorageRange { get; }
#pragma warning restore

#pragma warning disable 0618 // warning CS0618: 'AVSampleCursorChunkInfo' is obsolete: 'This API is not available on this platform.'
[Export ("currentChunkInfo")]
AVSampleCursorChunkInfo CurrentChunkInfo { get; }
#pragma warning restore

[Export ("currentSampleIndexInChunk")]
long CurrentSampleIndexInChunk { get; }

#pragma warning disable 0618 // warning CS0618: 'AVSampleCursorStorageRange' is obsolete: 'This API is not available on this platform.'
[Export ("currentSampleStorageRange")]
AVSampleCursorStorageRange CurrentSampleStorageRange { get; }
#pragma warning restore

#if MONOMAC
[NoiOS][NoWatch][NoTV]
Expand Down
3 changes: 3 additions & 0 deletions src/btouch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,9 @@ void Compile (List<string> arguments, int errorCode)

if (Driver.RunCommand (compile_command [0], arguments, null, out var compile_output, true, Driver.Verbosity) != 0)
throw ErrorHelper.CreateError (errorCode, $"{compiler} {StringUtils.FormatArguments (arguments)}\n{compile_output}".Replace ("\n", "\n\t"));
var output = string.Join (Environment.NewLine, compile_output.ToString ().Split (new char [] { '\n' }, StringSplitOptions.RemoveEmptyEntries));
if (!string.IsNullOrEmpty (output))
Console.WriteLine (output);
}

static string GetWorkDir ()
Expand Down
32 changes: 0 additions & 32 deletions src/carplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,6 @@ interface CPListItem : CPSelectableListItem, NSSecureCoding {
[Export ("initWithText:detailText:image:accessoryImage:accessoryType:")]
NativeHandle Constructor ([NullAllowed] string text, [NullAllowed] string detailText, [NullAllowed] UIImage image, [NullAllowed] UIImage accessoryImage, CPListItemAccessoryType accessoryType);

[NullAllowed, Export ("text")]
new string Text { get; }

[NullAllowed, Export ("detailText")]
string DetailText { get; }

Expand All @@ -519,9 +516,6 @@ interface CPListItem : CPSelectableListItem, NSSecureCoding {
[Export ("showsDisclosureIndicator")]
bool ShowsDisclosureIndicator { get; }

[NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)]
new NSObject UserInfo { get; set; }

[iOS (14, 0)]
[Export ("explicitContent")]
bool IsExplicitContent { [Bind ("isExplicitContent")] get; set; }
Expand Down Expand Up @@ -566,14 +560,6 @@ interface CPListItem : CPSelectableListItem, NSSecureCoding {
[iOS (14,0)]
[Export ("setText:")]
void SetText (string text);

[NullAllowed, iOS (14, 0)]
[Export ("handler", ArgumentSemantic.Copy)]
new CPSelectableListItemHandler Handler { get; set; }

[iOS (15, 0), MacCatalyst (15,0)]
[Export ("enabled")]
bool Enabled { [Bind ("isEnabled")] get; set; }
}

[NoWatch, NoTV, NoMac, iOS (12,0)]
Expand Down Expand Up @@ -1600,10 +1586,6 @@ interface CPListImageRowItem : CPSelectableListItem
[NullAllowed, Export ("listImageRowHandler", ArgumentSemantic.Copy)]
CPListImageRowItemHandler ListImageRowHandler { get; set; }

[Export ("handler", ArgumentSemantic.Copy)]
[NullAllowed]
new CPSelectableListItemHandler Handler { get; set; }

[Static]
[Export ("maximumImageSize")]
CGSize MaximumImageSize { get; }
Expand All @@ -1613,13 +1595,6 @@ interface CPListImageRowItem : CPSelectableListItem

[NullAllowed, Export ("text")]
new string Text { get; set; }

[NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)]
new NSObject UserInfo { get; set; }

[iOS (15, 0), MacCatalyst (15,0)]
[Export ("enabled")]
bool Enabled { [Bind ("isEnabled")] get; set; }
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
Expand Down Expand Up @@ -1686,13 +1661,6 @@ interface CPMessageListItem : CPListTemplateItem

[NullAllowed, Export ("text")]
new string Text { get; set; }

[NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)]
new NSObject UserInfo { get; set; }

[iOS (15, 0), MacCatalyst (15,0)]
[Export ("enabled")]
bool Enabled { [Bind ("isEnabled")] get; set; }
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
Expand Down
4 changes: 4 additions & 0 deletions src/contacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,9 @@ interface CNContactVCardSerialization {

#if !NET
[iOS (9,0), Mac (10,11)]
#pragma warning disable 0618 // warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
[Category (allowStaticMembers: true)]
#pragma warning disable
[BaseType (typeof (CNContainer))]
interface CNContainer_PredicatesExtension {

Expand Down Expand Up @@ -1682,7 +1684,9 @@ interface CNErrorUserInfoKey {

#if !NET
[iOS (9,0), Mac (10,11)]
#pragma warning disable 0618 // warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
[Category (allowStaticMembers: true)]
#pragma warning disable
[BaseType (typeof (CNGroup))]
interface CNGroup_PredicatesExtension {

Expand Down
8 changes: 8 additions & 0 deletions src/coredata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,17 +1046,21 @@ interface NSManagedObjectContext : NSCoding
[Export ("save:")]
bool Save (out NSError error);

#pragma warning disable 0109 // warning CS0109: The member 'NSManagedObjectContext.Lock()' does not hide an accessible member. The new keyword is not required.
[NoWatch][NoTV]
[Deprecated (PlatformName.iOS, 8, 0, message : "Use a queue style context and 'PerformAndWait' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 10, message : "Use a queue style context and 'PerformAndWait' instead.")]
[Export ("lock")]
new void Lock ();
#pragma warning restore

#pragma warning disable 0109 // warning CS0109: The member 'NSManagedObjectContext.Unlock()' does not hide an accessible member. The new keyword is not required.
[NoWatch][NoTV]
[Deprecated (PlatformName.iOS, 8, 0, message : "Use a queue style context and 'PerformAndWait' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 10, message : "Use a queue style context and 'PerformAndWait' instead.")]
[Export ("unlock")]
new void Unlock ();
#pragma warning restore

[NoWatch][NoTV]
[Deprecated (PlatformName.iOS, 8, 0, message : "Use a queue style context and 'Perform' instead.")]
Expand Down Expand Up @@ -2059,17 +2063,21 @@ partial interface NSPersistentStoreCoordinator
[return: NullAllowed]
NSManagedObjectID ManagedObjectIDForURIRepresentation (NSUrl url);

#pragma warning disable 0109 // warning CS0109: The member 'NSManagedObjectContext.Lock()' does not hide an accessible member. The new keyword is not required.
[NoWatch][NoTV]
[Deprecated (PlatformName.iOS, 8, 0, message: "Use 'PerformAndWait' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'PerformAndWait' instead.")]
[Export ("lock")]
new void Lock ();
#pragma warning restore

#pragma warning disable 0109 // warning CS0109: The member 'NSManagedObjectContext.Unlock()' does not hide an accessible member. The new keyword is not required.
[NoWatch][NoTV]
[Deprecated (PlatformName.iOS, 8, 0, message: "Use 'PerformAndWait' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'PerformAndWait' instead.")]
[Export ("unlock")]
new void Unlock ();
#pragma warning restore

[NoWatch][NoTV]
[Deprecated (PlatformName.iOS, 8, 0, message: "Use 'Perform' instead.")]
Expand Down
4 changes: 2 additions & 2 deletions src/coreimage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@ interface CIImage : NSSecureCoding, NSCopying {
[Static]
[Wrap ("FromData (data, options.GetDictionary ())")]
[return: NullAllowed]
CIImage FromData (NSData data, [NullAllowed] CIImageInitializationOptionsWithMetadata? options);
CIImage FromData (NSData data, [NullAllowed] CIImageInitializationOptionsWithMetadata options);

[Static]
[iOS(9,0)]
Expand Down Expand Up @@ -1795,7 +1795,7 @@ interface CIImage : NSSecureCoding, NSCopying {
[Mac (10,13)]
[Static]
[Wrap ("FromSurface (surface, options.GetDictionary ())")]
CIImage FromSurface (IOSurface.IOSurface surface, CIImageInitializationOptions? options);
CIImage FromSurface (IOSurface.IOSurface surface, CIImageInitializationOptions options);

[Static]
[Export ("imageWithColor:")]
Expand Down
4 changes: 4 additions & 0 deletions src/gamecontroller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2417,9 +2417,13 @@ interface IGCDevicePhysicalInput {}
[Mac (13,0), iOS (16,0), MacCatalyst (16,0), NoWatch, TV (16,0)]
[Protocol]
interface GCDevicePhysicalInput : GCDevicePhysicalInputState {
#if !XAMCORE_5_0
#pragma warning disable 0108 // warning CS0108: 'GCDevicePhysicalInput.Device' hides inherited member 'GCDevicePhysicalInputState.Device'. Use the new keyword if hiding was intended.
[Abstract]
[NullAllowed, Export ("device", ArgumentSemantic.Weak)]
IGCDevice Device { get; }
#pragma warning restore
#endif

[Abstract]
[NullAllowed, Export ("elementValueDidChangeHandler", ArgumentSemantic.Copy)]
Expand Down
2 changes: 2 additions & 0 deletions src/healthkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4205,7 +4205,9 @@ interface HKVerifiableClinicalRecordQuery

[iOS (15,4)]
[Export ("initWithRecordTypes:sourceTypes:predicate:resultsHandler:")]
#pragma warning disable 8632 // warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
IntPtr Constructor (string [] recordTypes, [BindAs (typeof (HKVerifiableClinicalRecordSourceType []))] NSString [] sourceTypes, [NullAllowed] NSPredicate predicate, Action<HKVerifiableClinicalRecordQuery, HKVerifiableClinicalRecord []?, NSError?> resultsHandler);
#pragma warning restore
}

[NoWatch, iOS (15,0), Mac (13,0)]
Expand Down
2 changes: 2 additions & 0 deletions src/mapkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1888,8 +1888,10 @@ partial interface MKTileOverlay : MKOverlay {
[NullAllowed]
string URLTemplate { get; }

#pragma warning disable 0109 // warning CS0109: The member 'MKTileOverlay.CanReplaceMapContent' does not hide an accessible member. The new keyword is not required.
[Export ("canReplaceMapContent")]
new bool CanReplaceMapContent { get; set; }
#pragma warning restore

[Export ("URLForTilePath:")]
NSUrl URLForTilePath (MKTileOverlayPath path);
Expand Down
2 changes: 2 additions & 0 deletions src/metal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,9 @@ partial interface MTLDevice {
[Abstract]
#endif
[Export ("accelerationStructureSizesWithDescriptor:")]
#pragma warning disable 0618 // warning CS0618: 'MTLAccelerationStructureSizes' is obsolete: 'This API is not available on this platform.'
MTLAccelerationStructureSizes CreateAccelerationStructureSizes (MTLAccelerationStructureDescriptor descriptor);
#pragma warning restore

[Mac (11,0), iOS (14,0), NoTV]
#if NET
Expand Down
2 changes: 2 additions & 0 deletions src/notificationcenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ bool WidgetAllowsEditing {
[Internal]
[Category]
#else
#pragma warning disable 0618 // warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
[Category (allowStaticMembers: true)] // Classic isn't internal so we need this
#pragma warning restore
#endif
interface UIVibrancyEffect_NotificationCenter {
[Internal]
Expand Down
Loading