public AddPipelineCommand( IStoredDataService storedDataService, IFileService fileService) : base(typeof(AddPipelineCommand).Namespace, nameof(AddPipelineCommand), HelpDefinition) { CommandPathParameter = new CommandParameterDefinition("path", CommandParameterDefinition.TypeValue.String, "Path to the pipeline json file", "p"); CommandNameParameter = new CommandParameterDefinition("name", CommandParameterDefinition.TypeValue.String, "Pipeline name", "n"); CommandDescriptionParameter = new CommandParameterDefinition("description", CommandParameterDefinition.TypeValue.String, "Pipeline description", "d"); RegisterCommandParameter(CommandPathParameter); RegisterCommandParameter(CommandNameParameter); RegisterCommandParameter(CommandDescriptionParameter); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); FileService = fileService ?? throw new ArgumentNullException(nameof(fileService)); }
public PipelineCommand( List <CommandBase> registeredCommands, ILoggerService loggerService, IFileService fileService, IRegistryService registryService, ICryptoService cryptoService, IStoredDataService storedDataService) : base(typeof(PipelineCommand).Namespace, nameof(PipelineCommand), HelpDefinition) { CommandPathParameter = new CommandParameterDefinition("path", CommandParameterDefinition.TypeValue.String, "Path with the ddpipeline.json file", "p"); CommandNameParameter = new CommandParameterDefinition( "name", CommandParameterDefinition.TypeValue.String, "Name of the registered pipeline", "n"); DebugParameter = new CommandParameterDefinition( "debug", CommandParameterDefinition.TypeValue.Boolean, "Initialize in debug mode. Will stop after every steps", "debug"); RegisterCommandParameter(CommandPathParameter); RegisterCommandParameter(CommandNameParameter); RegisterCommandParameter(DebugParameter); RegisteredCommands = registeredCommands ?? throw new ArgumentNullException(nameof(registeredCommands)); LoggerService = loggerService ?? throw new ArgumentNullException(nameof(loggerService)); FileService = fileService ?? throw new ArgumentNullException(nameof(fileService)); RegistryService = registryService ?? throw new ArgumentNullException(nameof(registryService)); CryptoService = cryptoService ?? throw new ArgumentNullException(nameof(cryptoService)); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); }
public ShowTemplatesCommand( IStoredDataService storedDataService) : base(typeof(ShowTemplatesCommand).Namespace, nameof(ShowTemplatesCommand), HelpDefinition) { StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); }
public AddParameterCommand( IStoredDataService storedDataService) : base(typeof(AddParameterCommand).Namespace, nameof(AddParameterCommand), HelpDefinition) { CommandKeyParameter = new CommandParameterDefinition("key", CommandParameterDefinition.TypeValue.String, "Key for the parameter. For replace with the value use [[key]]", "k"); CommandValueParameter = new CommandParameterDefinition("value", CommandParameterDefinition.TypeValue.String, "Value which will be replaced when used the key", "v"); CommandIsEncryptedParameter = new CommandParameterDefinition("encrypted", CommandParameterDefinition.TypeValue.Boolean, "Encrypt the parameter (Use for store passwords)", "e"); CommandIsAutoIncrementParameter = new CommandParameterDefinition("autoincrement", CommandParameterDefinition.TypeValue.Boolean, "Every time is used, the value will be autoincremented. Value should be integer.", "a"); RegisterCommandParameter(CommandKeyParameter); RegisterCommandParameter(CommandValueParameter); RegisterCommandParameter(CommandIsEncryptedParameter); RegisterCommandParameter(CommandIsAutoIncrementParameter); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); }
public ChatController(IStoredDataService <ChatMessage, ChatMessageDto, int> chatService, IStoredDataService <Room, RoomDto, Guid> roomService, IStoredDataService <UserRoom, UserRoomDto, int> userRoomService, IStoredDataService <User, UserDto, Guid> userService) { _chatService = chatService; _roomService = roomService; _userRoomService = userRoomService; _userService = userService; }
public ChatWebSocketMiddleware(RequestDelegate next, IStoredDataService <ChatMessage, ChatMessageDto, int> chatService, IStoredDataService <Room, RoomDto, Guid> roomService, IStoredDataService <UserRoom, UserRoomDto, int> userRoomService, IStoredDataService <User, UserDto, Guid> userService) { _next = next; _chatService = chatService; _roomService = roomService; _userRoomService = userRoomService; _userService = userService; }
public DeleteTemplateCommand( IStoredDataService storedDataService) : base(typeof(DeleteTemplateCommand).Namespace, nameof(DeleteTemplateCommand), HelpDefinition) { CommandNameParameter = new CommandParameterDefinition("name", CommandParameterDefinition.TypeValue.String, "Template name", "n"); RegisterCommandParameter(CommandNameParameter); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); }
public DeleteAliasCommand( IStoredDataService storedDataService) : base(typeof(DeleteAliasCommand).Namespace, nameof(DeleteAliasCommand), HelpDefinition) { CommandAliasParameter = new CommandParameterDefinition("alias", CommandParameterDefinition.TypeValue.String, "Alias name", "a"); RegisterCommandParameter(CommandAliasParameter); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); }
public ShowComandsHistoryCommand( IStoredDataService storedDataService) : base(typeof(ShowComandsHistoryCommand).Namespace, nameof(ShowComandsHistoryCommand), HelpDefinition) { StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); CountParameter = new CommandParameterDefinition("count", CommandParameterDefinition.TypeValue.Integer, "Count of records. Default value Count=10", "c"); RegisterCommandParameter(CountParameter); }
public DeleteParameterCommand( IStoredDataService storedDataService) : base(typeof(DeleteParameterCommand).Namespace, nameof(DeleteParameterCommand), HelpDefinition) { CommandKeyParameter = new CommandParameterDefinition("key", CommandParameterDefinition.TypeValue.String, "Parameter key for delete", "k"); RegisterCommandParameter(CommandKeyParameter); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); }
public List <CommandParameter> ResolveParameters( IStoredDataService storedDataService, List <CommandParameter> parameters) { var storedParameters = storedDataService.GetParameters(); foreach (var parameter in parameters.Where(k => !string.IsNullOrEmpty(k.ValueString))) { parameter.ValueString = ReplaceSystemParameters(parameter.ValueString); parameter.ValueString = ReplaceStringParameters(storedParameters, parameter.ValueString); } return(parameters); }
public CommandManager( ILoggerService loggerService, IStoredDataService storedDataService, ICryptoService cryptoService, ExecutionModeTypes executionMode = ExecutionModeTypes.Single) { Commands = new List <CommandBase>(); LoggerService = loggerService ?? throw new ArgumentNullException(nameof(loggerService)); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); CryptoService = cryptoService ?? throw new ArgumentNullException(nameof(cryptoService)); ExecutionMode = executionMode; _parameterManager = new ParameterManager(CryptoService); EncryptedResolved = new List <string>(); }
private static void RegisterCommands( IStoredDataService storedDataService, IRegistryService registryService, ICryptoService cryptoService) { IClipboardService clipboardService = new ClipboardService(); IFileService fileService = new FileService(); IPromptCommandService promptCommandService = new PromptCommandService(); IWebService webService = new WebService(); ITemplateReplacementService templateReplacementService = new TemplateReplacementService(); Register(new Commands.DD.EchoCommand()); Register(new Commands.DD.WindowsCmdCommand(promptCommandService)); Register(new Commands.Dev.Git.CSharpGitIgnoreCommand(webService)); Register(new Commands.Dev.DotNet.PublishDebugWinCommand()); Register(new Commands.Dev.DotNet.PublishReleaseWinCommand()); Register(new Commands.Dev.DotNet.OpenVisualStudioCommand(promptCommandService, fileService)); Register(new Commands.Windows.OpenRepoCommand(fileService, promptCommandService, clipboardService)); Register(new Commands.DD.AddParameterCommand(storedDataService)); Register(new Commands.DD.ShowParametersCommand(storedDataService)); Register(new Commands.DD.DeleteParameterCommand(storedDataService)); Register(new Commands.DD.UpdateParameterCommand(storedDataService)); Register(new Commands.DD.DeleteAliasCommand(storedDataService)); Register(new Commands.DD.ShowAliasCommand(storedDataService)); Register(new Commands.Dev.Utils.TemplateCommand(fileService, storedDataService)); Register(new Commands.DD.AddTemplateCommand(storedDataService, fileService)); Register(new Commands.DD.DeleteTemplateCommand(storedDataService)); Register(new Commands.DD.ShowTemplatesCommand(storedDataService)); Register(new Commands.Windows.ZipCommand(fileService)); Register(new Commands.Windows.UnzipCommand(fileService)); Register(new Commands.Windows.ReplaceFileContentCommand(fileService)); Register(new Commands.Windows.RenameFolderCommand(fileService)); Register(new Commands.DD.AddPipelineCommand(storedDataService, fileService)); Register(new Commands.DD.DeletePipelineCommand(storedDataService)); Register(new Commands.DD.ShowPipelinesCommand(storedDataService)); Register(new Commands.DD.ShowComandsHistoryCommand(storedDataService)); Register(new Commands.Windows.MovePathCommand(fileService)); Register(new Commands.DD.ConfirmCommand()); Register(new Commands.Dev.DotNet.AddWPFUserControlCommand(fileService, templateReplacementService)); Register(new Commands.Dev.DotNet.AddCRUDDomainServicesCommand(fileService, templateReplacementService)); //Last commands for register Register(new Commands.DD.AddAliasCommand(storedDataService, commandManager.Commands)); Register(new Commands.DD.PipelineCommand(commandManager.Commands, _loggerService, fileService, registryService, cryptoService, storedDataService)); Register(new Commands.HelpCommand(commandManager.Commands)); }
public MainViewModel() { StoredRecentProjectsService = new StoredRecentProjectsService(); _registryService = new RegistryService(); _cryptoService = new CryptoService(_registryService); _fileService = new FileService(); _jsonParserService = new JsonParserService(); _projectManager = new ProjectManager(); EventManager = new DomainEventManager(); EventManager.OnSelectedUseCase += EventManager_OnSelectedUseCase; EventManager.OnGenericFormInputRequested += EventManager_OnGenericFormInputRequested; NewActions = _projectManager.ActionManager.Actions.OrderBy(k => k.Name).ToList(); SetRecentProjects(); InitializeCommands(); InitializeMapper(); NewProject(); }
public UpdateParameterCommand( IStoredDataService storedDataService) : base(typeof(UpdateParameterCommand).Namespace, nameof(UpdateParameterCommand), HelpDefinition) { CommandKeyParameter = new CommandParameterDefinition("key", CommandParameterDefinition.TypeValue.String, "Key for the parameter. For replace with the value use [[key]]", "k"); CommandValueParameter = new CommandParameterDefinition("value", CommandParameterDefinition.TypeValue.String, "Value which will be replaced when used the key", "v"); RegisterCommandParameter(CommandKeyParameter); RegisterCommandParameter(CommandValueParameter); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); }
private static void RegisterCommands( IStoredDataService storedDataService, IRegistryService registryService, ICryptoService cryptoService) { IClipboardService clipboardService = new ClipboardService(); IFileService fileService = new FileService(); IPromptCommandService promptCommandService = new PromptCommandService(); IWebService webService = new WebService(); Register(new Commands.ImportSolutionCommand(fileService)); Register(new Commands.GetTokenCommand()); Register(new Commands.DownloadAssemblyCommand(fileService)); Register(new Commands.CloneUsdConfigurationCommand()); Register(new Commands.ImportWebResourceCommand(fileService)); Register(new Commands.ExecutePeriodicallyWorkflowOnFetchCommand(fileService)); Register(new Commands.HelpCommand(commandManager.Commands)); }
public AddAliasCommand( IStoredDataService storedDataService, List <CommandBase> registeredCommands) : base(typeof(AddAliasCommand).Namespace, nameof(AddAliasCommand), HelpDefinition) { CommandNameParameter = new CommandParameterDefinition("command", CommandParameterDefinition.TypeValue.String, "Command name for the alias", "c"); CommandAliasParameter = new CommandParameterDefinition("alias", CommandParameterDefinition.TypeValue.String, "Alias for the command", "a"); RegisterCommandParameter(CommandNameParameter); RegisterCommandParameter(CommandAliasParameter); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); RegisteredCommands = registeredCommands ?? throw new ArgumentNullException(nameof(registeredCommands)); }
public TemplateCommand( IFileService directoryService, IStoredDataService storedDataService) : base(typeof(TemplateCommand).Namespace, nameof(TemplateCommand), HelpDefinition) { CommandPathParameter = new CommandParameterDefinition( "path", CommandParameterDefinition.TypeValue.String, "Path for clone with ddtemplate.json", "p"); CommandNameParameter = new CommandParameterDefinition( "name", CommandParameterDefinition.TypeValue.String, "Name of the registered template", "n"); DestinationPathParameter = new CommandParameterDefinition( "destinationpath", CommandParameterDefinition.TypeValue.String, "Destination path for place the cloned template", "d"); ValuesParameter = new CommandParameterDefinition( "values", CommandParameterDefinition.TypeValue.String, "Values for replace in template. Use pairs like \"Key1=Value 1;Key2=Value 2;...\"", "v"); FileService = directoryService ?? throw new ArgumentNullException(nameof(directoryService)); StoredDataService = storedDataService ?? throw new ArgumentNullException(nameof(storedDataService)); RegisterCommandParameter(CommandPathParameter); RegisterCommandParameter(CommandNameParameter); RegisterCommandParameter(DestinationPathParameter); RegisterCommandParameter(ValuesParameter); UserTemplateSetupReplaceStrings = new List <ReplacePairValue>(); }
public TemplateCommandTest() { _cryptoServiceMock = new CryptoServiceMock(); _storedDataService = new StoredDataServiceMock(); _loggerServiceMock = new LoggerServiceMock(); }
public CommandManagerTest() { _storedDataServiceMock = new StoredDataServiceMock(); _cryptoServiceMock = new CryptoServiceMock(); _loggerServiceMock = new LoggerServiceMock(); }
public RoomsController(IStoredDataService<Room, RoomDto, Guid> service) { roomService = service; }
/// <summary> /// Creates a new entity of this controller. /// </summary> /// <param name="service"></param> public AbstractDataEntityController(IStoredDataService <TEntity, TDto, TId> service) => this.Service = service ?? throw new ArgumentNullException(nameof(service));
/// <summary> /// Controller constuctor /// </summary> /// <param name="service"></param> public UserController(IStoredDataService <User, UserDto, int> service) : base(service) => userService = service ?? throw new ArgumentNullException();
public HomeController(IStoredDataService <User, UserDto, Guid> service) { userService = service; }