Skip to content

Commit

Permalink
[UserNotifications] Rename method to have a verb. (#784)
Browse files Browse the repository at this point in the history
`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).
  • Loading branch information
rolfbjarne authored and spouliot committed Sep 7, 2016
1 parent 5db30f6 commit f49a0cd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/usernotifications.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<UNNotificationContent> contentHandler);

Expand Down Expand Up @@ -521,15 +522,15 @@ 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")]
double TimeInterval { get; }

[Static]
[Export ("triggerWithTimeInterval:repeats:")]
UNTimeIntervalNotificationTrigger Trigger (double timeInterval, bool repeats);
UNTimeIntervalNotificationTrigger CreateTrigger (double timeInterval, bool repeats);

[NullAllowed, Export ("nextTriggerDate")]
NSDate NextTriggerDate { get; }
Expand All @@ -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 {

Expand All @@ -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; }
Expand All @@ -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)]
Expand All @@ -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 { }
Expand Down

0 comments on commit f49a0cd

Please sign in to comment.