Example #1
0
        public static int Main(string[] args)
        {
            var arguments = new RunnerArguments(args);

            if (arguments.Help)
            {
                ShowHelp();
                return (int) ExitCode.Failed;
            }

            if (string.IsNullOrWhiteSpace(arguments.ProjectPath))
            {
                ShowHelp();
                System.Console.WriteLine("");
                System.Console.WriteLine("ERROR: No path specified!");
                return (int) ExitCode.Failed;
            }

            var settings = !string.IsNullOrWhiteSpace(arguments.SettingsLocation)
                ? arguments.SettingsLocation
                : Path.Combine(Assembly.GetExecutingAssembly().Location + "Settings.StyleCop");

            var searchOption = arguments.NotRecursive ? SearchOption.TopDirectoryOnly : SearchOption.AllDirectories;

            var projectPath = arguments.ProjectPath;

            return ProcessFolder(settings, projectPath, searchOption);
        }
Example #2
0
        public Runner(RunnerArguments args)
        {
            arguments   = args;
            webDriver   = driverUtil.GetWebDriver(arguments.DriverType);
            stepActions = new StepActions(webDriver);
            switch (args.Source)
            {
            //case DatasourceType.Excel:
            //    dataAccess = new SpreadsheetDataAccess(args);
            //    break;
            case DatasourceType.SQLServer:
                break;

            default:
                break;
            }
        }