Beispiel #1
0
        public MenuWindow(ICommandsProvider commandsProvider) : base("Code Generator - Menu")
        {
            _commandsProvider = commandsProvider;


            ChangeState(new StartState(commandsProvider));
        }
Beispiel #2
0
        public OpenApiModeWasCreatedState(OpenApiModel openApiModel,
                                          ICommandsProvider commandsProvider)
        {
            _commandsProvider = commandsProvider;
            _exitCommand      = commandsProvider.ExitCommand();

            _generateCommand = commandsProvider.GeneratorCommand(openApiModel, OnSuccess, OnError);
        }
        public FileWasSelectedState(FileSystemEntry file, ICommandsProvider commandsProvider)
        {
            _file             = file;
            _commandsProvider = commandsProvider;
            _exitCommand      = commandsProvider.ExitCommand();

            _deserializationCommand =
                commandsProvider.DeserializationCommand(file, _jsonSerializerSettings, OnDeserialization, OnError);
        }
Beispiel #4
0
 public Command(string name, string postfix, string description, string help, EnsoPostfixType postfixType, ICommandsProvider provider, bool canUseTextSelectionForParameter, bool canUseFileSelectionForParameter, ParameterInputArguments parameterInputArguments, params Type[] supportedParameterTypeProvidersArray)
 {
     this.Name        = name;
     this.Postfix     = postfix;
     this.Description = description;
     this.Help        = help;
     this.PostfixType = postfixType;
     this.provider    = provider;
     this.supportedParameterTypeProviders = new List <Type>();
     this.canUseTextSelectionForParameter = canUseTextSelectionForParameter;
     this.canUseFileSelectionForParameter = canUseFileSelectionForParameter;
     this.supportedParameterTypeProviders.AddRange(supportedParameterTypeProvidersArray);
     this.parameterInputArguments = parameterInputArguments;
     this.parametersOnExecute     = new List <IWorkItem>();
 }
Beispiel #5
0
        public StartState(ICommandsProvider commandsProvider)
        {
            _commandsProvider = commandsProvider;

            _exitCommand = commandsProvider.ExitCommand();
        }