You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By calculating the counts in the constructor and storing them directly in separate properties (SuccessCount and FailedCount), you avoid unnecessary iterations over the list when accessing the counts. This can help improve the performance, especially if the list of NotificationResults is large.
///
/// The notification count that is
/// successfully accepted by FCM.
///
public int SuccessCount => this.NotificationResults.Count(x => x.IsSuccess);
///
/// The notification count that is NOT accepted by FCM.
///
public int FailedCount => this.NotificationResults.Count(x => !x.IsSuccess);
The text was updated successfully, but these errors were encountered:
...\src\AdsPush.Abstraction\Firebase\FirebaseNotificationBatchResult.cs
By calculating the counts in the constructor and storing them directly in separate properties (SuccessCount and FailedCount),
you avoid unnecessary iterations over the list when accessing the counts.
This can help improve the performance, especially if the list of NotificationResults is large.
///
/// The notification count that is
/// successfully accepted by FCM.
///
public int SuccessCount => this.NotificationResults.Count(x => x.IsSuccess);
///
/// The notification count that is NOT accepted by FCM.
///
public int FailedCount => this.NotificationResults.Count(x => !x.IsSuccess);
The text was updated successfully, but these errors were encountered: