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

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

            OccuredOn = DateTime.UtcNow;
            EventType = eventInfo.GetEventType();
            EventInfo = SerializeEventInfo(eventInfo);
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 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);
        }