예제 #1
0
        internal ToolExitCodes Run()
        {
            if (!_options.NoLogo)
            {
                ToolConsole.WriteHeader();
            }

            if (_options.GetToolMode() == ToolMode.DisplayHelp)
            {
                ToolConsole.WriteHelpText();
                return(ToolExitCodes.Success);
            }
            else if (!_options.Quiet)
            {
                ToolConsole.WriteWarning(System.SR.WrnToolIsUsedDirectly);
                return(ToolExitCodes.InputError);
            }
            else
            {
                InputModule inputModule = InputModule.LoadInputs(_options);

                Tool.Assert(_options.GetToolMode().HasValue, System.SR.Format(System.SR.AmbiguousToolUseage));
                return(ExecuteToolMode(inputModule));
            }
        }
예제 #2
0
        internal ToolExitCodes Run()
        {
            if (!_options.NoLogo)
            {
                ToolConsole.WriteHeader();
            }

            if (_options.GetToolMode() == ToolMode.DisplayHelp)
            {
                ToolConsole.WriteHelpText();
                return(ToolExitCodes.Success);
            }
            else
            {
                InputModule inputModule = InputModule.LoadInputs(_options);

                Tool.Assert(_options.GetToolMode().HasValue, System.SR.Format(System.SR.AmbiguousToolUseage, Options.Cmd.Target, Options.Cmd.Validate));
                ToolMode toolMode = _options.GetToolMode().Value;

                return(ExecuteToolMode(toolMode, inputModule));
            }
        }