private bool ParseArguments()
        {
            ProjectPath = Options.ProjectArgument.Value;
            if (string.IsNullOrEmpty(ProjectPath))
            {
                Application.Error.WriteLine("Project path not specified.");
                return(false);
            }

            if (!OutputPathOption.HasValue())
            {
                Application.Error.WriteLine($"Option {OutputPathTemplate} does not specify a value.");
                return(false);
            }

            if (!ApplicationNameOption.HasValue())
            {
                Application.Error.WriteLine($"Option {ApplicationNameTemplate} does not specify a value.");
                return(false);
            }

            if (!Options.ContentRootOption.HasValue())
            {
                Application.Error.WriteLine($"Option {CommonOptions.ContentRootTemplate} does not specify a value.");
                return(false);
            }

            return(true);
        }
示例#2
0
        private void ParseArguments()
        {
            ProjectPath = Options.ProjectArgument.Value;
            if (string.IsNullOrEmpty(ProjectPath))
            {
                throw new ArgumentException("Project path not specified.");
            }

            if (!OutputPathOption.HasValue())
            {
                throw new ArgumentException($"Option {OutputPathTemplate} does not specify a value.");
            }

            if (!ApplicationNameOption.HasValue())
            {
                throw new ArgumentException($"Option {ApplicationNameTemplate} does not specify a value.");
            }
        }