From 37abbc89659800e3a3b62beaae0e566d713b4be3 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 7 Sep 2016 13:11:16 +0200 Subject: [PATCH] [UserNotifications] Rename method to have a verb. `Trigger` can be both a verb and a noun, but according to Apple's documentation it's a noun in these cases (the method 'Creates and returns a trigger'), so add the verb `Create` to make the meaning clear (and follow API guidelines that say methods should have a verb). --- src/usernotifications.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/usernotifications.cs b/src/usernotifications.cs index 2bd52936140c..bed4c0bd2671 100644 --- a/src/usernotifications.cs +++ b/src/usernotifications.cs @@ -430,6 +430,7 @@ interface UNTextInputNotificationResponse { [DisableDefaultCtor] // as per docs interface UNNotificationServiceExtension { + // Not async because app developers are supposed to implement/override this method, not call it themselves. [Export ("didReceiveNotificationRequest:withContentHandler:")] void DidReceiveNotificationRequest (UNNotificationRequest request, Action contentHandler); @@ -521,7 +522,7 @@ interface UNPushNotificationTrigger { [Introduced (PlatformName.TvOS, 10, 0)] [Introduced (PlatformName.WatchOS, 3, 0)] [BaseType (typeof (UNNotificationTrigger))] - [DisableDefaultCtor] // as per doc, use supplied method (Trigger) + [DisableDefaultCtor] // as per doc, use supplied method (CreateTrigger) interface UNTimeIntervalNotificationTrigger { [Export ("timeInterval")] @@ -529,7 +530,7 @@ interface UNTimeIntervalNotificationTrigger { [Static] [Export ("triggerWithTimeInterval:repeats:")] - UNTimeIntervalNotificationTrigger Trigger (double timeInterval, bool repeats); + UNTimeIntervalNotificationTrigger CreateTrigger (double timeInterval, bool repeats); [NullAllowed, Export ("nextTriggerDate")] NSDate NextTriggerDate { get; } @@ -538,7 +539,7 @@ interface UNTimeIntervalNotificationTrigger { [Introduced (PlatformName.iOS, 10, 0)] [Introduced (PlatformName.TvOS, 10, 0)] [Introduced (PlatformName.WatchOS, 3, 0)] - [DisableDefaultCtor] // as per doc, use supplied method (Trigger) + [DisableDefaultCtor] // as per doc, use supplied method (CreateTrigger) [BaseType (typeof (UNNotificationTrigger))] interface UNCalendarNotificationTrigger { @@ -547,7 +548,7 @@ interface UNCalendarNotificationTrigger { [Static] [Export ("triggerWithDateMatchingComponents:repeats:")] - UNCalendarNotificationTrigger Trigger (NSDateComponents dateComponents, bool repeats); + UNCalendarNotificationTrigger CreateTrigger (NSDateComponents dateComponents, bool repeats); [NullAllowed, Export ("nextTriggerDate")] NSDate NextTriggerDate { get; } @@ -557,7 +558,7 @@ interface UNCalendarNotificationTrigger { [Introduced (PlatformName.WatchOS, 3, 0)] [Unavailable (PlatformName.TvOS)] [BaseType (typeof (UNNotificationTrigger))] - [DisableDefaultCtor] // as per doc, use supplied method (Trigger) + [DisableDefaultCtor] // as per doc, use supplied method (CreateTrigger) interface UNLocationNotificationTrigger { [Export ("region", ArgumentSemantic.Copy)] @@ -566,7 +567,7 @@ interface UNLocationNotificationTrigger { [Unavailable (PlatformName.WatchOS)] [Static] [Export ("triggerWithRegion:repeats:")] - UNLocationNotificationTrigger Trigger (CLRegion region, bool repeats); + UNLocationNotificationTrigger CreateTrigger (CLRegion region, bool repeats); } interface IUNUserNotificationCenterDelegate { }