public static void Main(string[] args) { var consoleAppender = ConfigureLogging(); var log = LogManager.GetLogger(typeof(SlnFileGenerator)); var fileGenerator = new SlnFileGenerator(); var optionsBuilder = new ArgsOptionsBuilder(); var options = optionsBuilder.Build(args, Directory.GetCurrentDirectory()); if (options.ShowHelp) { optionsBuilder.WriteHelpMessage(); return; } consoleAppender.Threshold = options.LoggingThreshold; var solutionPath = fileGenerator.GenerateSolutionFile(options); if (options.OpenInVisualStudio) { log.InfoFormat("Opening {0} in Visual Studio {1}", solutionPath, options.VisualStudioVersion.Year); VisualStudioIntegration.OpenSolution(solutionPath, options.VisualStudioVersion); } }
public static void Main(string[] args) { var consoleAppender = ConfigureLogging(); var log = LogManager.GetLogger(typeof(SlnFileGenerator)); var fileGenerator = new SlnFileGenerator(); var optionsBuilder = new ArgsOptionsBuilder(); var options = optionsBuilder.Build(args, Directory.GetCurrentDirectory()); if (options.ShowHelp) { optionsBuilder.WriteHelpMessage(); return; } consoleAppender.Threshold = options.LoggingThreshold; var solutionPath = fileGenerator.GenerateSolutionFile(options); if (options.OpenInVisualStudio) { log.InfoFormat("Opening {0} in Visual Studio {1}", solutionPath, options.VisualStudioVersion.Year); VisualStudioIntegration.OpenSolution(solutionPath, options.VisualStudioVersion); } if (options.LoadAndSaveSolutionWithVS) { log.InfoFormat("Loading {0} and saving with Visual Studio {1}", solutionPath, options.VisualStudioVersion.Year); VisualStudioIntegration.LoadAndSaveSolutionInVS(solutionPath, options.VisualStudioVersion); } }
public static void Main(string[] args) { var consoleAppender = new ConsoleAppender() { Layout = new PatternLayout("%message%newline"), Threshold = Level.Info }; log4net.Config.BasicConfigurator.Configure(consoleAppender); var log = LogManager.GetLogger(typeof(SlnFileGenerator)); var fileGenerator = new SlnFileGenerator(); var optionsBuilder = new ArgsOptionsBuilder(); var options = optionsBuilder.Build(args, Directory.GetCurrentDirectory()); if (options.ShowHelp) { optionsBuilder.WriteHelpMessage(); return; } consoleAppender.Threshold = options.LoggingThreshold; var solutionPath = fileGenerator.GenerateSolutionFile(options); if (options.OpenInVisualStudio) { log.InfoFormat("Opening {0} in Visual Studio {1}", solutionPath, options.VisualStudioVersion.Year); VisualStudioIntegration.OpenSolution(solutionPath, options.VisualStudioVersion); } }
public static void Main(string[] args) { var consoleAppender = ConfigureLogging(); consoleAppender.Threshold = Level.Off; //args = new string[] { // "--root", // @"D:\src\test\", // "--t", // @"D:\src\test\", // "--open", // "--tp", // @"C:\windows\system32\notepad.exe", // "--rel" //}; //args = new string[] { //"--root", //@"D:\src\ConsentPro2\\ConsentPro\src", //"--t", //@"D:\src\ConsentPro2\ConsentPro\src", //"-open", //"--tp", //@"C:\windows\system32\notepad.exe" }; var log = LogManager.GetLogger(typeof(SlnFileGenerator)); log.InfoFormat("SlimJim CommandLine: {0}", string.Join(",", args)); var fileGenerator = new SlnFileGenerator(); var optionsBuilder = new ArgsOptionsBuilder(); var options = optionsBuilder.Build(args, Directory.GetCurrentDirectory()); log.Info("Options:"); log.Info(options.ToString()); if (options.ShowHelp) { optionsBuilder.WriteHelpMessage(); return; } var solutionPath = fileGenerator.GenerateSolutionFile(options); if (options.OpenInVisualStudio) { log.InfoFormat("Opening {0} in Visual Studio {1}", solutionPath, options.VisualStudioVersion.Year); VisualStudioIntegration.OpenSolution(solutionPath, options); } }