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)); } }
private ToolExitCodes GenerateSerializer(InputModule inputModule) { ToolConsole.WriteLine(System.SR.Format(System.SR.GeneratingSerializer)); XmlSerializerGenerator generator = new XmlSerializerGenerator(_options); generator.GenerateCode(inputModule.Assemblies); return(ToolExitCodes.Success); }
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)); } }