예제 #1
0
        public override void ExecuteCommand()
        {
            if (!this.IsValid)
            {
                return;
            }

            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.WriteLine("Create WebAPI project? Y/N");
            string result = Console.ReadLine();

            if (result != null && result.ToLower().Equals("y"))
            {
                this.WebApiProject = true;
            }

            Console.ForegroundColor = ConsoleColor.White;

            if (this.WebApiProject)
            {
                Console.WriteLine("creating app " + this.AppName + " with WebAPI.");
                var webApi = new WebApiProjectCreator(this.AppName);
                webApi.Create();
                return;
            }

            Console.WriteLine("Creating app " + this.AppName);
            var mvc = new MvcProjectCreator(this.AppName);

            mvc.Create();
        }
예제 #2
0
파일: CreateApp.cs 프로젝트: frapid/frapid
        public override async Task ExecuteCommandAsync()
        {
            await Task.Delay(1).ConfigureAwait(false);

            if(!this.IsValid)
            {
                return;
            }

            Console.WriteLine("Creating app " + this.AppName);
            var mvc = new MvcProjectCreator(this.AppName);
            mvc.Create();
        }
예제 #3
0
        public override async Task ExecuteCommandAsync()
        {
            await Task.Delay(1).ConfigureAwait(false);

            if (!this.IsValid)
            {
                return;
            }

            Console.WriteLine("Creating app " + this.AppName);
            var mvc = new MvcProjectCreator(this.AppName);

            mvc.Create();
        }