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());
        }
示例#2
0
 public static HandleMessageResult Noop(this BaseExecutor executor)
 {
     return(executor.Services.Noop());
 }
示例#3
0
 public static HandleMessageResult EmptyMessage(this BaseExecutor executor, Guid?conversationHandle = null)
 {
     return(executor.Services.EmptyMessage(conversationHandle));
 }
示例#4
0
 public static HandleMessageResult CombinedResult(this BaseExecutor executor, params HandleMessageResult[] resultHandlers)
 {
     return(executor.Services.CombinedResult(resultHandlers));
 }
示例#5
0
 public static HandleMessageResult StepCompleted(this BaseExecutor executor, Guid?conversationHandle = null)
 {
     return(executor.Services.StepCompleted(conversationHandle));
 }
示例#6
0
 public static HandleMessageResult ReplyWithBody(this BaseExecutor executor, string messageType, XElement xmlBody, Guid?conversationHandle = null)
 {
     return(executor.Services.ReplyWithBody(messageType, xmlBody, conversationHandle));
 }
示例#7
0
 public static HandleMessageResult EmptyReply(this BaseExecutor executor, string messageType, Guid?conversationHandle = null)
 {
     return(executor.Services.EmptyReply(messageType, conversationHandle));
 }
示例#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));
 }
示例#9
0
 public static HandleMessageResult EndDialogWithError(this BaseExecutor executor, string error, int?errocode, Guid?conversationHandle = null)
 {
     return(executor.Services.EndDialogWithError(error, errocode, conversationHandle));
 }