/// <summary> /// Initializes a new instance of the <see cref="ScheduledCallback"/> class. /// </summary> /// <param name="actionAsync">Action to execute when callback time arrives.</param> /// <param name="delay">How long to delay callback execution.</param> /// <param name="id">Identifier for callback. Must be unique within the callback domain.</param> /// <param name="domain">Domain of callback identifier. All callback IDs within a domain must be unique. If an ID duplicates another within the same domain, then it will not be scheduled.</param> /// <param name="protocol">Protocol associated with scheduled callback</param> /// <param name="timeout">How long to allow callback to execute before cancelling it.</param> /// <param name="delayToleranceBefore">Delay tolerance before.</param> /// <param name="delayToleranceAfter">Delay tolerance after.</param> /// <param name="priority">The priority of the callback.</param> /// <param name="sourceType">The type that scheduled the callback.</param> public ScheduledCallback(ActionAsyncDelegate actionAsync, TimeSpan delay, string id, string domain, Protocol protocol, TimeSpan?timeout, TimeSpan delayToleranceBefore, TimeSpan delayToleranceAfter, ScheduledCallbackPriority priority, Type sourceType) : this() { ActionAsync = actionAsync; Delay = delay; Id = (domain ?? "SENSUS") + "." + id; // if a domain is not specified, use a global domain. Protocol = protocol; Timeout = timeout; DelayToleranceBefore = delayToleranceBefore; DelayToleranceAfter = delayToleranceAfter; Priority = priority; SourceType = sourceType; }
/// <summary> /// Initializes a new instance of the <see cref="ScheduledCallback"/> class. /// </summary> /// <param name="actionAsync">Action to execute when callback time arrives.</param> /// <param name="initialDelay">How long to delay callback execution.</param> /// <param name="repeatDelay">How long to delay repeating callback executions following the first callback.</param> /// <param name="id">Identifier for callback. Must be unique within the callback domain.</param> /// <param name="domain">Domain of callback identifier. All callback IDs within a domain must be unique. If an ID duplicates another in the same domain, then it will not be scheduled.</param> /// <param name="protocol">Protocol associated with scheduled callback</param> /// <param name="timeout">How long to allow callback to execute before cancelling it.</param> /// <param name="delayToleranceBefore">Delay tolerance before.</param> /// <param name="delayToleranceAfter">Delay tolerance after.</param> /// <param name="priority">The priority of the callback.</param> /// <param name="sourceType">The type that scheduled the callback.</param> public ScheduledCallback(ActionAsyncDelegate actionAsync, TimeSpan initialDelay, TimeSpan repeatDelay, string id, string domain, Protocol protocol, TimeSpan?timeout, TimeSpan delayToleranceBefore, TimeSpan delayToleranceAfter, ScheduledCallbackPriority priority, Type sourceType) : this(actionAsync, initialDelay, id, domain, protocol, timeout, delayToleranceBefore, delayToleranceAfter, priority, sourceType) { RepeatDelay = repeatDelay; }