示例#1
0
        public static void Send(User user, string body, int busId)
        {
            var Id = ConverterServices.ConvertGuid(user.Id);

            var notification = new NotificationDto()
            {
                Body = body, UserId = Id
            };

            NotificationPushServices.Push(user.DeviceToken, busId, notification);
            LogsService.Add(body, Id);
        }
示例#2
0
        public static void Send(List <User> users, string body)
        {
            foreach (var user in users)
            {
                var Id = ConverterServices.ConvertGuid(user.Id);

                var notification = new NotificationDto()
                {
                    Body = body, UserId = Id
                };

                NotificationPushServices.Push(user.DeviceToken, notification);
                LogsService.Add(body, Id);
            }
        }