Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        public static SlnGenerationOptions BuildOptions(string[] args, string workingDirectory)
        {
            var builder = new ArgsOptionsBuilder();

            return(builder.Build(args, workingDirectory));
        }
Esempio n. 3
0
 public static SlnGenerationOptions BuildOptions(string[] args, string workingDirectory)
 {
     var builder = new ArgsOptionsBuilder();
     return builder.Build(args, workingDirectory);
 }