public DatabaseTaskManager(IUserService userService, IApplicationState applicationState, ICommandExecutionService executionService, BackupHelper backupHelper) { this._userService = userService; this._executionService = executionService; this._applicationState = applicationState; this._backupHelper = backupHelper; }
public OfferResynchronizationViewModel(ICommandExecutionService commandExecutionService) { this.commandExecutionService = commandExecutionService; AcceptCommand = new DelegateCommand(Accept); CancelCommand = new DelegateCommand(Cancel); }
public void OnConfigurationSaved(RepositoryMode repositoryMode, PluginConfigurationDialogResult configuration, IDialogService dialogService, ICommandExecutionService commandExecutionService) { if (repositoryMode != RepositoryMode.ClientServer) return; if (!configuration.IsEnabled) return; if (isEnabledBeforeConfig) return; dialogService.ShowDialog(new OfferResynchronizationViewModel(commandExecutionService)); }
/// <summary> /// Initializes a new orchestrator /// </summary> /// <param name="context">The orchestation context</param> public CommandOrchestrator(IApplicationContext context, ICommandExecutionService <TSpec, TPayload> CommandPattern, CommandOrchestrationSettings Settings) : base(context) { this.CommandPattern = CommandPattern; this.cts = new CancellationTokenSource(); this.ct = cts.Token; this.Settings = Settings; }
public void Start(ICommandExecutionService pattern, CommandOrchestrationSettings Settings) { try { Orchestrators.GetOrAdd(pattern.SpecType, _ => GetOrchestrator(pattern, Settings ?? DefaultCommandSettings)); } catch (Exception e) { Notify(OrchestrationStartError(pattern.SpecType, e)); } }
public Option <ICommandOrchestrator> Orchestrator(ICommandExecutionService pattern, bool start, CommandOrchestrationSettings settings) => Try(() => { var orcType = typeof(CommandOrchestrator <,>).MakeGenericType(pattern.SpecType, pattern.PayloadType); return(some((ICommandOrchestrator)Activator.CreateInstance(orcType, Context, pattern, settings)).OnSome(o => { if (start) { o.Start(); } })); });
public LevelEditingService(ILevelDataEditingService levelDataEditingService, IMapEditingService mapEditingService, IMapConfigRepository mapConfigRepository, IMapGetService mapGetService, ILevelDataRepository levelDataRepository, ICommandExecutionService commandExecutionService) { _levelDataEditingService = levelDataEditingService; _mapEditingService = mapEditingService; _mapConfigRepository = mapConfigRepository; _mapGetService = mapGetService; _levelDataRepository = levelDataRepository; _commandExecutionService = commandExecutionService; }
IOption ExecuteCommand(ICommandExecutionService pattern, ICommandSpec command, bool save) { Notify(ExecutingCommand(command)); if (save) { var saved = CommandStore?.SaveSpec(command); if (!saved.HasValue) { return(saved); } else if (!saved.Value) { return(saved); } } var expansion = command.ExpandVariables(); var option = pattern.TryExecute(expansion); if (option != null) { if (option.IsNone) { Notify(option.Message); } else { if (option.Message.IsEmpty) { Notify(CompletedCommandExecution(command, option.Value)); } else { Notify(option.Message); } } } else { Notify(EmptyCommandResult(command)); } return(option); }
public CalculatorController(ICommandExecutionService commandExecutionService) { _commandExecutionService = commandExecutionService; }
public void OnConfigurationSaved(RepositoryMode repositoryMode, PluginConfigurationDialogResult configuration, IDialogService dialogService, ICommandExecutionService commandExecutionService) { if (!previouslyEnabled && configuration.IsEnabled) { commandExecutionService.IssueCommand("RefreshNow"); } }
ICommandOrchestrator GetOrchestrator(ICommandExecutionService pattern, CommandOrchestrationSettings Settings) { var orchestrator = C.CPS().Orchestrator(pattern, true, Settings); return(orchestrator.Require());; }
private void OnEnable() { _commandExecutionService = commandExecutionServiceProvider.Provide(); _inGameMessageService = inGameMessageServiceProvider.Provide(); }
public CommandExecutor(IApplicationContext context, ICommandExecutionService <TSpec, TPayload> Pattern) : base(context) { this.Pattern = Pattern; }
public SlashCommandController(IOptions <SlackSettings> slackSettings, ISignatureValidationService signatureValidationService, ICommandExecutionService commandExecutionService) { SlackSettings = slackSettings.Value; SignatureValidationService = signatureValidationService; CommandExecutionService = commandExecutionService; }
ICommandOrchestrator <TSpec, TPayload> CreateOrchestration <TSpec, TPayload> (ICommandExecutionService <TSpec, TPayload> pattern, CommandOrchestrationSettings settings) where TSpec : CommandSpec <TSpec, TPayload>, new() => new CommandOrchestrator <TSpec, TPayload>(Context, pattern, settings);
ICommandQueueExecutor <TSpec> QueueExecutor <TSpec>(ICommandExecutionService <TSpec> pattern) where TSpec : CommandSpec <TSpec>, new() => new CommandQueueExecutor <TSpec>(Context, pattern);