コード例 #1
0
 public void Insert(NotificationVO notification)
 {
     throw new NotImplementedException();
 }
コード例 #2
0
ファイル: NotificationLogger.cs プロジェクト: kamsiuman/awdk
        private void SendNotification(string entityType, string actionType, NotificationVO notificationVo)
        {
            var title = GetNotificationTitle(entityType, notificationVo.ActorFullName, actionType);

            ///
            /// the logic is to send the notification by
            /// 1) getting the list of user (receipant) that assocaited with the project
            /// 2) excluding the creater....
            ///
            ///
            ///
            var content = string.Empty;
            //var projectVo = projectStudioRepository.GetFullProjectById(notificationVo.ProjectId);
            //var receiverList = projectVo.UserAlias.Select(alias => alias.ToUpperInvariant()).
            //    Except(new[] { notificationVo.CreatedBy.ToUpperInvariant() }).ToList();

            if (entityType == SkusEntityType.SkusEvent)
            {
                content = "on project {0}, {1}".FormatInvariant(notificationVo.ProjectName, notificationVo.SectionName);
            }
            //if (entityType == SkusEntityType.SkusTraj)
            //{
            //    content = "on project " + notificationVo.ProjectName;
            //}

            var timeStamp = DateTime.UtcNow;
            //hub.Clients.Users(receiverList).serverNotify(new { title, content, timeStamp });
        }