Skip to content

Commit 6ee9c86

Browse files
More XML docs.
1 parent 124ccb3 commit 6ee9c86

12 files changed

+155
-41
lines changed

sdk/Notifo.SDK.FirebasePlugin/NotifoFirebasePlugin.android.cs

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,34 @@
1212

1313
namespace Notifo.SDK.FirebasePlugin
1414
{
15+
/// <summary>
16+
/// Plugin initialization.
17+
/// </summary>
1518
public class NotifoFirebasePlugin
1619
{
17-
public static void Initialize(Context context, INotifoStartup notifoStartup, bool resetToken, bool createDefaultNotificationChannel = true, bool autoRegistration = true)
20+
/// <summary>
21+
/// Initializes the firebase plugin.
22+
/// </summary>
23+
/// <param name="context">The current application context.</param>
24+
/// <param name="notifoStartup">The <see cref="INotifoStartup"/> implementation.</param>
25+
/// <param name="resetToken">Set to <see langword="true"/> while debugging.</param>
26+
/// <param name="autoRegistration">Automatically register for push notifications.</param>
27+
public static void Initialize(Context context, INotifoStartup notifoStartup, bool resetToken, bool autoRegistration = true)
1828
{
1929
ConfigureDefaultChannel();
2030

21-
FirebasePushNotificationManager.Initialize(context, new NotifoPushNotificationHandler(), resetToken, createDefaultNotificationChannel, autoRegistration);
31+
FirebasePushNotificationManager.Initialize(context, new NotifoPushNotificationHandler(), resetToken, createDefaultNotificationChannel: true, autoRegistration);
2232
notifoStartup.ConfigureService(NotifoIO.Current);
2333
}
2434

25-
public static void Initialize(Context context, INotifoStartup notifoStartup, NotificationUserCategory[] notificationCategories, bool resetToken, bool createDefaultNotificationChannel = true, bool autoRegistration = true)
35+
/// <summary>
36+
/// Method for processing open notification intent.
37+
/// </summary>
38+
/// <param name="activity">The current activity.</param>
39+
/// <param name="intent">The intent for processing.</param>
40+
public static void ProcessIntent(Activity activity, Intent intent)
2641
{
27-
ConfigureDefaultChannel();
28-
29-
FirebasePushNotificationManager.Initialize(context, notificationCategories, resetToken, createDefaultNotificationChannel, autoRegistration);
30-
notifoStartup.ConfigureService(NotifoIO.Current);
31-
}
32-
33-
public static void Initialize(Context context, INotifoStartup notifoStartup, IPushNotificationHandler pushNotificationHandler, bool resetToken, bool createDefaultNotificationChannel = true, bool autoRegistration = true)
34-
{
35-
ConfigureDefaultChannel();
36-
37-
FirebasePushNotificationManager.Initialize(context, pushNotificationHandler, resetToken, createDefaultNotificationChannel, autoRegistration);
38-
notifoStartup.ConfigureService(NotifoIO.Current);
39-
}
40-
41-
public static void ProcessIntent(Activity activity, Intent intent, bool enableDelayedResponse = true)
42-
{
43-
FirebasePushNotificationManager.ProcessIntent(activity, intent, enableDelayedResponse);
42+
FirebasePushNotificationManager.ProcessIntent(activity, intent, enableDelayedResponse: true);
4443
NotifoIO.Current.UseFirebasePluginEventsProvider();
4544
}
4645

sdk/Notifo.SDK.FirebasePlugin/NotifoFirebasePlugin.ios.cs

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,29 @@
1414
using UserNotifications;
1515

1616
namespace Notifo.SDK.FirebasePlugin
17-
{
17+
{
18+
/// <summary>
19+
/// Plugin initialization.
20+
/// </summary>
1821
public class NotifoFirebasePlugin
1922
{
20-
public static void Initialize(NSDictionary options, INotifoStartup notifoStartup, NotificationUserCategory[] notificationUserCategories, bool autoRegistration = true)
21-
{
22-
FirebasePushNotificationManager.Initialize(options, notificationUserCategories, autoRegistration);
23-
notifoStartup.ConfigureService(NotifoIO.Current);
24-
}
25-
26-
public static void Initialize(NSDictionary options, INotifoStartup notifoStartup, IPushNotificationHandler pushNotificationHandler, bool autoRegistration = true)
27-
{
28-
FirebasePushNotificationManager.Initialize(options, pushNotificationHandler, autoRegistration);
29-
notifoStartup.ConfigureService(NotifoIO.Current);
30-
}
31-
23+
/// <summary>
24+
/// Initializes the firebase plugin.
25+
/// </summary>
26+
/// <param name="options">Application launch options.</param>
27+
/// <param name="notifoStartup">The <see cref="INotifoStartup"/> implementation.</param>
28+
/// <param name="autoRegistration">Automatically register for push notifications.</param>
3229
public static void Initialize(NSDictionary options, INotifoStartup notifoStartup, bool autoRegistration = true)
3330
{
3431
FirebasePushNotificationManager.Initialize(options, autoRegistration);
3532
notifoStartup.ConfigureService(NotifoIO.Current);
3633
}
3734

35+
/// <summary>
36+
/// Invoked when the application received a remote notification.
37+
/// </summary>
38+
/// <param name="data">The notification data dictionary.</param>
39+
/// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
3840
public static async Task DidReceiveMessageAsync(NSDictionary data)
3941
{
4042
Log.Debug(Strings.ReceivedNotification, data);
@@ -47,12 +49,26 @@ public static async Task DidReceiveMessageAsync(NSDictionary data)
4749
FirebasePushNotificationManager.DidReceiveMessage(data);
4850
}
4951

52+
/// <summary>
53+
/// Indicates that a call to <see cref="UIKit.UIApplication.RegisterForRemoteNotifications"/> succeeded.
54+
/// </summary>
55+
/// <param name="deviceToken">The device token.</param>
5056
public static void DidRegisterRemoteNotifications(NSData deviceToken) =>
5157
FirebasePushNotificationManager.DidRegisterRemoteNotifications(deviceToken);
5258

59+
/// <summary>
60+
/// Indicates that a call to <see cref="UIKit.UIApplication.RegisterForRemoteNotifications"/> failed.
61+
/// </summary>
62+
/// <param name="error">The error.</param>
5363
public static void RemoteNotificationRegistrationFailed(NSError error) =>
54-
FirebasePushNotificationManager.RemoteNotificationRegistrationFailed(error);
55-
64+
FirebasePushNotificationManager.RemoteNotificationRegistrationFailed(error);
65+
66+
/// <summary>
67+
/// Method for processing the user's response to a delivered notification.
68+
/// </summary>
69+
/// <param name="center">The shared user notification center object that received the notification.</param>
70+
/// <param name="response">The user's response to the notification.</param>
71+
/// <param name="completionHandler">The action to execute when you have finished processing the user's response.</param>
5672
public static void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler)
5773
{
5874
NotifoIO.DidReceiveNotificationResponse(center, response, completionHandler);

sdk/Notifo.SDK.FirebasePlugin/NotifoMobilePushExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
namespace Notifo.SDK.FirebasePlugin
1414
{
15+
/// <summary>
16+
/// The <see cref="INotifoMobilePush"/> extension methods.
17+
/// </summary>
1518
public static class NotifoMobilePushExtensions
1619
{
1720
private static readonly Lazy<IPushEventsProvider> CurrentPluginEventsProvider =

sdk/Notifo.SDK/Extensions/DeviceInfoExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Notifo.SDK.Extensions
1111
{
12-
public static class DeviceInfoExtensions
12+
internal static class DeviceInfoExtensions
1313
{
1414
public static MobileDeviceType ToMobileDeviceType(this DevicePlatform platform)
1515
{

sdk/Notifo.SDK/Extensions/NSDictionaryExtensions.ios.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Notifo.SDK.Extensions
1313
{
14-
public static class NSDictionaryExtensions
14+
internal static class NSDictionaryExtensions
1515
{
1616
public static Dictionary<string, object> ToDictionary(this NSDictionary nsDictionary)
1717
{

sdk/Notifo.SDK/INotifoStartup.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Notifo.SDK
1111
{
12+
/// <summary>
13+
/// Provides a place to configure Notifo mobile push service.
14+
/// </summary>
1215
public interface INotifoStartup
1316
{
1417
/// <summary>

sdk/Notifo.SDK/NotifoIO.ios.cs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,25 @@
1313
namespace Notifo.SDK
1414
{
1515
public static partial class NotifoIO
16-
{
16+
{
17+
/// <summary>
18+
/// Method for processing notification before delivery.
19+
/// </summary>
20+
/// <param name="request">The request that was received.</param>
21+
/// <param name="bestAttemptContent">The notification content.</param>
22+
/// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
1723
public static async Task DidReceiveNotificationRequestAsync(UNNotificationRequest request, UNMutableNotificationContent bestAttemptContent)
1824
{
1925
if (Current is NotifoMobilePushImplementation notifoMobilePush)
2026
{
2127
await notifoMobilePush.DidReceiveNotificationRequestAsync(request, bestAttemptContent);
2228
}
23-
}
24-
29+
}
30+
31+
/// <summary>
32+
/// Method for pulling pending notifications.
33+
/// </summary>
34+
/// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
2535
public static async Task DidReceivePullRefreshRequestAsync()
2636
{
2737
if (Current is NotifoMobilePushImplementation notifoMobilePush)
@@ -30,6 +40,12 @@ public static async Task DidReceivePullRefreshRequestAsync()
3040
}
3141
}
3242

43+
/// <summary>
44+
/// Method for processing the user's response to a delivered notification.
45+
/// </summary>
46+
/// <param name="center">The shared user notification center object that received the notification.</param>
47+
/// <param name="response">The user's response to the notification.</param>
48+
/// <param name="completionHandler">The action to execute when you have finished processing the user's response.</param>
3349
public static void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler)
3450
{
3551
if (Current is NotifoMobilePushImplementation notifoMobilePush)

sdk/Notifo.SDK/NotifoIO.shared.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,16 @@
1616

1717
namespace Notifo.SDK
1818
{
19+
/// <summary>
20+
/// Notifo service implementation.
21+
/// </summary>
1922
public static partial class NotifoIO
2023
{
2124
private static readonly Lazy<INotifoMobilePush> Instance = new Lazy<INotifoMobilePush>(() => SetupNotifoMobilePush(), LazyThreadSafetyMode.PublicationOnly);
25+
26+
/// <summary>
27+
/// Current service implementation to use.
28+
/// </summary>
2229
public static INotifoMobilePush Current => Instance.Value;
2330

2431
private static INotifoMobilePush SetupNotifoMobilePush()

sdk/Notifo.SDK/NotifoMobilePush/INotifoMobilePush.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
namespace Notifo.SDK.NotifoMobilePush
1212
{
13+
/// <summary>
14+
/// Notifo mobile push service interface.
15+
/// </summary>
1316
public interface INotifoMobilePush : INotifoClient
1417
{
1518
/// <summary>

sdk/Notifo.SDK/PushEventProvider/IPushEventsProvider.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Notifo.SDK.PushEventProvider
1111
{
12+
/// <summary>
13+
/// Push events provider interface.
14+
/// </summary>
1215
public interface IPushEventsProvider
1316
{
1417
/// <summary>

0 commit comments

Comments
 (0)