public List <Core.Notification.Domain.dtoModuleNotificationMessage> GetNotificationMessages(Core.Notification.Domain.NotificationAction action, Core.Notification.Domain.NotificationChannel channel, Core.Notification.Domain.NotificationMode mode, int idSenderUser, Core.Notification.Domain.WebSiteSettings webSiteSettings) { List <lm.Comol.Core.Notification.Domain.dtoModuleNotificationMessage> messages = null; return(messages); }
public List <Core.Notification.Domain.dtoModuleNotificationMessage> GetNotificationMessages(Core.Notification.Domain.NotificationAction action, Core.Notification.Domain.NotificationChannel channel, Core.Notification.Domain.NotificationMode mode, int idSenderUser, lm.Comol.Core.Notification.Domain.WebSiteSettings webSiteSettings) { List <Core.Notification.Domain.dtoModuleNotificationMessage> messages = null; Domain.WbRoom room = RoomGet(action.IdObject); if (room != null) { List <Domain.WbUser> users = action.IdModuleUsers.Select(i => UserGet(i)).ToList().Where(u => u != null && u.Id > 0).ToList(); // INDIVIDUO TUTTE LE POSSIBILI LINGUE DEGLI UTENTI DESTINATARI List <String> languageCodes = (users != null) ? users.Select(u => u.LanguageCode).Distinct().ToList() : null; Dictionary <String, lm.Comol.Core.Notification.Domain.dtoNotificationMessage> templates = GetTemplates(action.IdModuleAction, channel, mode, languageCodes); if (languageCodes.Any()) { webSiteSettings.GenerateDateTimeFormat(languageCodes); } if (templates.Any()) { messages = GetMessages(action.IdModuleAction, action.IdCommunity, room, users, templates, webSiteSettings); } } return(messages); }
private Dictionary <String, lm.Comol.Core.Notification.Domain.dtoNotificationMessage> GetTemplates(long idAction, Core.Notification.Domain.NotificationChannel channel, Core.Notification.Domain.NotificationMode mode, List <String> languageCodes) { Dictionary <String, lm.Comol.Core.Notification.Domain.dtoNotificationMessage> templates = new Dictionary <string, Core.Notification.Domain.dtoNotificationMessage>(); if (languageCodes.Any()) { /// RECUPERO I TEMPLATE PER CIASCUNA LINGUA templates = languageCodes.ToDictionary(l => l, l => ServiceTemplate.GetNotificationMessage(l, ModuleWebConferencing.UniqueCode, idAction, mode, channel)); } return(templates); }
public List <Core.Notification.Domain.dtoModuleNotificationMessage> GetNotificationMessages(Core.Notification.Domain.NotificationAction action, Core.Notification.Domain.NotificationChannel channel, Core.Notification.Domain.NotificationMode mode, int idSenderUser, Core.Notification.Domain.WebSiteSettings webSiteSettings) { throw new NotImplementedException(); }