protected override async Task <HandleMessageResult> DoExecuteTask(CancellationToken token)
        {
            OnDemandTaskManager.FlushTaskInfos();

            switch (_settingsType)
            {
            case SettingsType.None:
                break;

            case SettingsType.OnDemandTaskSettings:
                if (_settingsID < 0)
                {
                    BaseExecutor.FlushStaticSettings();
                }
                else
                {
                    BaseExecutor.FlushStaticSettings(_settingsID);
                }
                break;

            case SettingsType.Shedule:
                if (_settingsID < 0)
                {
                    _scheduleManager.UnLoadSchedules();
                    await _scheduleManager.LoadSchedules();
                }
                else
                {
                    await _scheduleManager.ReloadSchedule(_settingsID);
                }
                break;

            default:
                Logger.LogError(string.Format("UnKnown settingsType: {0}", _settingsType));
                break;
            }

            return(this.Noop());
        }
Exemple #2
0
 public static HandleMessageResult Noop(this BaseExecutor executor)
 {
     return(executor.Services.Noop());
 }
Exemple #3
0
 public static HandleMessageResult EmptyMessage(this BaseExecutor executor, Guid?conversationHandle = null)
 {
     return(executor.Services.EmptyMessage(conversationHandle));
 }
Exemple #4
0
 public static HandleMessageResult CombinedResult(this BaseExecutor executor, params HandleMessageResult[] resultHandlers)
 {
     return(executor.Services.CombinedResult(resultHandlers));
 }
Exemple #5
0
 public static HandleMessageResult StepCompleted(this BaseExecutor executor, Guid?conversationHandle = null)
 {
     return(executor.Services.StepCompleted(conversationHandle));
 }
Exemple #6
0
 public static HandleMessageResult ReplyWithBody(this BaseExecutor executor, string messageType, XElement xmlBody, Guid?conversationHandle = null)
 {
     return(executor.Services.ReplyWithBody(messageType, xmlBody, conversationHandle));
 }
Exemple #7
0
 public static HandleMessageResult EmptyReply(this BaseExecutor executor, string messageType, Guid?conversationHandle = null)
 {
     return(executor.Services.EmptyReply(messageType, conversationHandle));
 }
Exemple #8
0
 public static HandleMessageResult Defer(this BaseExecutor executor, string fromService, DateTime activationTime, int attemptNumber = 1, TimeSpan?lifeTime = null)
 {
     return(executor.Services.Defer(fromService, activationTime, attemptNumber, lifeTime));
 }
Exemple #9
0
 public static HandleMessageResult EndDialogWithError(this BaseExecutor executor, string error, int?errocode, Guid?conversationHandle = null)
 {
     return(executor.Services.EndDialogWithError(error, errocode, conversationHandle));
 }