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); }
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); }