예제 #1
0
        internal void ConfigureSettings(NotificationType configuringNotification, NotificationValue newValue)
        {
            var newSettings =
                new Dictionary <NotificationType, NotificationValue>(Settings.ToDictionary(kv => kv.Key, kv => kv.Value))
            {
                [configuringNotification] = newValue
            };

            Settings = newSettings;
        }
예제 #2
0
        public void ConfigureNotificationsSettings(int userId, NotificationType configuringNotification,
                                                   NotificationValue newValue)
        {
            Ensure.Any.IsNotNull(configuringNotification);
            Ensure.Any.IsNotNull(newValue);

            var currentUser = _userRepository.GetUserById(userId);

            currentUser.NotificationsSettings.ConfigureSettings(configuringNotification, newValue);
            _userRepository.Update(currentUser);
        }
예제 #3
0
 internal void ConfigureNotificationsSettings(NotificationType configuringEvent, NotificationValue newValue)
 {
     NotificationsSettings.ConfigureSettings(configuringEvent, newValue);
 }
 public ConfigureNotificationsRequest(NotificationType configuringNotification, NotificationValue newValue)
 {
     ConfiguringNotification = configuringNotification;
     NewValue = newValue;
 }
예제 #5
0
        public static void RecordNotification(NotificationValue value)
        {
            var DeviceId = GetDeviceId(value.PhoneNo);

            InsertNotification(DeviceId, value.Client, value.SubjectLine, value.BodyLine);
        }