Esempio n. 1
0
        public RecentActivityFrontendModel Map(LogEntryDto dto)
        {
            var dashboardLogEntryType = GetLogEntryType(dto);

            if (string.IsNullOrEmpty(dashboardLogEntryType))
            {
                return(null);
            }

            return(new RecentActivityFrontendModel()
            {
                NodeId = dto.NodeId,
                NodeName = dto.NodeName,
                Datestamp = dto.Datestamp,
                ScheduledPublishDate = dto.NodeScheduledDate,
                ActivityType = dashboardLogEntryType,
                User = new UserFrontendModel()
                {
                    Name = dto.UserName,
                    Avatar = UserExtensions.GetUserAvatarUrls(dto.UserId, dto.UserEmail, dto.UserAvatar, _appCaches.RuntimeCache)
                }
            });
        }