Ejemplo n.º 1
0
        public void OnLoad(DurableTimerExtension timerExtension)
        {
            _timerExtension = timerExtension;
            _sortedTimerList.OnLoad();

            foreach (TimerData timerData in _sortedTimerList.Timers)
            {
                //timerData.IOThreadTimer = new IOThreadTimer(this.timerExtension.OnTimerFiredCallback, timerData.Bookmark, false, 0);
                if (timerData.ExpirationTime <= DateTime.UtcNow)
                {
                    // If the timer expired, we want to fire it immediately to win the race against UnloadOnIdle policy
                    timerExtension.OnTimerFiredCallback(timerData.Bookmark);
                }
                else
                {
                    //timerData.IOThreadTimer.Set(timerData.ExpirationTime - DateTime.UtcNow);
                    timerData.DelayTimer = new DelayTimer(_timerExtension.OnTimerFiredCallback, timerData.Bookmark, timerData.ExpirationTime - DateTime.UtcNow);
                }
            }
        }
Ejemplo n.º 2
0
 public TimerTable(DurableTimerExtension timerExtension)
 {
     _sortedTimerList = new SortedTimerList();
     _timerExtension  = timerExtension;
 }
Ejemplo n.º 3
0
 public TimerPersistenceParticipant(DurableTimerExtension timerExtension)
     : base(false, false)
 {
     this.defaultTimerExtension = timerExtension;
 }
Ejemplo n.º 4
0
 public BookmarkResumptionState(Bookmark timerBookmark, DurableTimerExtension timerExtension, WorkflowInstanceProxy instance)
 {
     this.TimerBookmark  = timerBookmark;
     this.TimerExtension = timerExtension;
     this.Instance       = instance;
 }