示例#1
0
 public Event(IEventInfo eventInfo, int id = 0)
 {
     Id         = id;
     OccurredOn = DateTimeOffset.Now;
     EventInfo  = JsonConvert.SerializeObject(eventInfo);
     EventType  = eventInfo.GetEventType();
 }
示例#2
0
        public Event(IEventInfo eventInfo)
        {
            Require.NotNull(eventInfo, nameof(eventInfo));

            OccuredOn = DateTime.UtcNow;
            EventType = eventInfo.GetEventType();
            EventInfo = SerializeEventInfo(eventInfo);
        }
示例#3
0
        public Event(IEventInfo eventInfo)
        {
            Require.NotNull(eventInfo, nameof(eventInfo));

            OccuredOn = DateTime.UtcNow;
            EventType = eventInfo.GetEventType();
            EventInfo = SerializeEventInfo(eventInfo);
        }
        protected void SendOutEmailsAboutEvent(int[] userIds, IEventInfo eventInfo)
        {
            var ids =
                userIds.Where(
                    id =>
                        _userPresentationProvider.GetUserEventSettings(id, eventInfo.GetEventType()) ==
                        NotificationSettingValue.SendNotificationAndMail).ToArray();

            Mailer.SendNotificationEmail(ids, eventInfo);
        }
示例#5
0
        protected void SendOutEmailsAboutEvent(int[] userIds, IEventInfo eventInfo)
        {
            var ids =
                userIds.Where(
                    id =>
                    _userPresentationProvider.GetUserEventSettings(id, eventInfo.GetEventType()) ==
                    NotificationSettingValue.SendNotificationAndMail).ToArray();

            Mailer.SendNotificationEmail(ids, eventInfo);
        }