예제 #1
0
        public virtual async Task <ServiceExecutionResult> CreateAppAsync(AbpNewAppInput input)
        {
            var args = CreateCommandLineArgs(input, "abp new", input.SolutionName);

            await _newCommand.ExecuteAsync(args);

            return(new ServiceExecutionResult(true));
        }
예제 #2
0
        public async Task IllegalProjectName_Test()
        {
            var illegalProjectNames = new[]
            {
                "MyCompanyName.MyProjectName",
                "MyProjectName",
                "CON", //Windows doesn't accept these names as file name
                "AUX",
                "PRN",
                "COM1",
                "LPT2"
            };

            foreach (var illegalProjectName in illegalProjectNames)
            {
                var args = new CommandLineArgs("new", illegalProjectName);
                await _newCommand.ExecuteAsync(args).ShouldThrowAsync <CliUsageException>();
            }
        }
예제 #3
0
    private async Task CreateNewModuleAsync(ModuleWithMastersInfo module, string modulesFolderInSolution,
                                            string version, bool newProTemplate = false)
    {
        var args = new CommandLineArgs("new", module.Name);

        args.Options.Add("t", newProTemplate ? ModuleProTemplate.TemplateName : ModuleTemplate.TemplateName);
        args.Options.Add("v", version);
        args.Options.Add("o", Path.Combine(modulesFolderInSolution, module.Name));

        await NewCommand.ExecuteAsync(args);
    }