WebApplications.Utilities.Scheduling.ScheduledFunction.ExecuteNow C# (CSharp) Method

ExecuteNow() public abstract method

Executes the scheduled function now, unless it is already executing, in which case it waits for the result of the current execution.
public abstract ExecuteNow ( ) : ScheduledFunctionResult
return ScheduledFunctionResult
        public abstract ScheduledFunctionResult ExecuteNow();
    }

Usage Example

コード例 #1
0
        /// <summary>
        /// Ticks every second.
        /// </summary>
        /// <param name="state">The state.</param>
        private static void Tick(object state)
        {
            ScheduledFunction scheduledFunction = state as ScheduledFunction;

            if (scheduledFunction == null)
            {
                return;
            }

            // Check we're still due.
            if (scheduledFunction.NextExecutionDue <= DateTime.Now)
            {
                scheduledFunction.ExecuteNow();
            }

            SetTimer(scheduledFunction);
        }
All Usage Examples Of WebApplications.Utilities.Scheduling.ScheduledFunction::ExecuteNow