コード例 #1
0
 public ICommand GeneratorCommand(
     OpenApiModel openApiModel, Action onSuccess,
     Action <Exception> onError
     )
 {
     return(new GenerateCommand(_appController, _logger, openApiModel, onSuccess, onError));
 }
コード例 #2
0
        public OpenApiModeWasCreatedState(OpenApiModel openApiModel,
                                          ICommandsProvider commandsProvider)
        {
            _commandsProvider = commandsProvider;
            _exitCommand      = commandsProvider.ExitCommand();

            _generateCommand = commandsProvider.GeneratorCommand(openApiModel, OnSuccess, OnError);
        }
コード例 #3
0
ファイル: GenerateCommand.cs プロジェクト: lukmccall/CookBook
 public GenerateCommand(AppController controller, ILogger logger, OpenApiModel openApiModel, Action onSuccess,
                        Action <Exception> onError)
 {
     _controller   = controller;
     _logger       = logger;
     _openApiModel = openApiModel;
     _onSuccess    = onSuccess;
     _onError      = onError;
 }
コード例 #4
0
 public void Generate(OpenApiModel openApiModel)
 {
     ParseSchemas(openApiModel.Schemas);
     ParseEndpoints(openApiModel.Endpoints);
     CreateFiles(GeneratorContext.GetTypesToGenerate(), GeneratorContext.GetFunctionsToGenerate());
 }
コード例 #5
0
 private void OnDeserialization(OpenApiModel openApiModel)
 {
     _window.ChangeState(new OpenApiModeWasCreatedState(openApiModel, _commandsProvider));
 }