Beispiel #1
0
        public IEnumerable <HistoryEvent> TimerStartedGraph(Identity identity, TimeSpan fireAfter, bool isARescheduleTimer = false)
        {
            var historyEvents = new List <HistoryEvent>();
            var eventIds      = EventIds.TimerStartedIds(ref _currentEventId);

            historyEvents.Add(new HistoryEvent()
            {
                EventType = EventType.TimerStarted,
                EventId   = eventIds.EventId(EventIds.Started),
                TimerStartedEventAttributes = new TimerStartedEventAttributes()
                {
                    TimerId            = identity.Id,
                    StartToFireTimeout = ((long)fireAfter.TotalSeconds).ToString(),
                    Control            = (new TimerScheduleData()
                    {
                        TimerName = identity.Name, IsARescheduleTimer = isARescheduleTimer
                    }).ToJson()
                }
            });

            return(historyEvents);
        }