コード例 #1
0
 private static void FireNotificationReceivedEvent(NotificationInfoForRequesting args)
 {
     foreach (var item in ReceivedNotification)
     {
         item.Value.Invoke(args);
     }
 }
コード例 #2
0
ファイル: UserCodes.cs プロジェクト: lekhasy/RawNotification
        public static void OnNotificationReceivedInBGTask(NotificationInfoForRequesting args)
        {
            SharedLibs.JSONObjectSerializer <string> serializer = new SharedLibs.JSONObjectSerializer <string>();
            string content = serializer.BytesToObject(args.NotificationPreviewContent);

            DotNetCoreLibs.ToastNotificationHelper.Show("New Notification received in BG", content);
        }
コード例 #3
0
        private async void RNAdapter_ReceivedNotification1(NotificationInfoForRequesting args)
        {
            JSONObjectSerializer <string> serializer = new JSONObjectSerializer <string>();
            var content = serializer.BytesToObject(args.NotificationPreviewContent);

            await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
                Messages.Add(new PreviewModel {
                    Content = content, NotificationAccessKey = args.NotificationAccessKey, NotificationId = args.NotificationId
                });
                NoNotificationVisibility = _Messages.Count > 0 ? Visibility.Collapsed : Visibility.Visible;
            });
        }
コード例 #4
0
 public async Task AddNotificationAsync(NotificationInfoForRequesting entity)
 {
     await Notifications.Add(entity);
 }