Exemple #1
0
 static Push()
 {
     _pushDelegate.OnPushNotificationReceivedAction = notification =>
     {
         var pushEventArgs = new PushNotificationReceivedEventArgs
         {
             Title      = notification.Title,
             Message    = notification.Message,
             CustomData = notification.CustomData?.ToDictionary(i => i.Key.ToString(), i => i.Value.ToString())
         };
         PushNotificationReceived?.Invoke(null, pushEventArgs);
     };
     MSPush.SetDelegate(_pushDelegate);
 }
Exemple #2
0
 static Push()
 {
     _pushDelegate.OnPushNotificationReceivedAction = notification =>
     {
         var pushEventArgs = new PushNotificationReceivedEventArgs
         {
             Title      = notification.Title,
             Message    = notification.Message,
             CustomData = NSDictionaryToDotNet(notification.CustomData)
         };
         PushNotificationReceived?.Invoke(null, pushEventArgs);
     };
     MSPush.SetDelegate(_pushDelegate);
 }