comparison Implab/Components/PollingComponent.cs @ 205:8200ab154c8a v2

Added ResetState to RunnableComponent to reset in case of failure Added StateChanged event to IRunnable Renamed Promise.SUCCESS -> Promise.Success Added Promise.FromException Renamed Bundle -> PromiseAll in PromiseExtensions
author cin
date Tue, 25 Oct 2016 17:40:33 +0300
parents 4d9830a9bbb8
children 7d07503621fe
comparison
equal deleted inserted replaced
203:4d9830a9bbb8 205:8200ab154c8a
122 122
123 /// <summary> 123 /// <summary>
124 /// Invoked when the timer ticks, use this method to implement your logic 124 /// Invoked when the timer ticks, use this method to implement your logic
125 /// </summary> 125 /// </summary>
126 protected virtual IPromise OnTick(ICancellationToken cancellationToken) { 126 protected virtual IPromise OnTick(ICancellationToken cancellationToken) {
127 return Promise.SUCCESS; 127 return Promise.Success;
128 } 128 }
129 129
130 protected override IPromise OnStop() { 130 protected override IPromise OnStop() {
131 m_timer.Change(-1, -1); 131 m_timer.Change(-1, -1);
132 132