public CreateConfigFileStrategy(IBaseReporter reporter, IConfigFileGenerator configFileGenerator, IFileSystem fileSystem)
 {
     _reporter              = reporter;
     _configFileGenerator   = configFileGenerator;
     _fileSystem            = fileSystem;
     _defaultConfigFilePath = _fileSystem.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), @".tsqllintrc");
 }
 public CreateConfigFileStrategy(IBaseReporter reporter, IConfigFileGenerator configFileGenerator, IFileSystemWrapper fileSystem)
 {
     this.reporter            = reporter;
     this.configFileGenerator = configFileGenerator;
     this.fileSystem          = fileSystem;
     defaultConfigFilePath    = fileSystem.CombinePath(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), @".tsqllintrc");
 }
示例#3
0
        private static void ReportVersionInfo(IBaseReporter reporter)
        {
            var assembly = Assembly.GetExecutingAssembly();
            var fvi      = FileVersionInfo.GetVersionInfo(assembly.Location);
            var version  = fvi.FileVersion;

            reporter.Report(string.Format("v{0}", version));
        }
示例#4
0
 public ConfigHandler(CommandLineOptions commandLineOptions, IBaseReporter reporter)
 {
     Reporter                 = reporter;
     CommandLineOptions       = commandLineOptions;
     ConfigFileFinder         = new ConfigFileFinder();
     ConfigFileGenerator      = new ConfigFileGenerator(reporter);
     CommandLineOptionHandler = new CommandLineOptionHandler(CommandLineOptions, ConfigFileFinder, ConfigFileGenerator, Reporter);
 }
示例#5
0
 public CommandLineOptionHandler(CommandLineOptions commandLineOptions,
                                 IConfigFileFinder configFileFinder,
                                 IConfigFileGenerator configFileGenerator,
                                 IBaseReporter reporter)
 {
     CommandLineOptions  = commandLineOptions;
     ConfigFileFinder    = configFileFinder;
     ConfigFileGenerator = configFileGenerator;
     Reporter            = reporter;
 }
示例#6
0
 public CommandLineOptionHandler(
     CommandLineOptions commandLineOptions,
     IConfigFileGenerator configFileGenerator,
     IConfigReader configReader,
     IBaseReporter reporter)
 {
     this.commandLineOptions  = commandLineOptions;
     this.configFileGenerator = configFileGenerator;
     this.configReader        = configReader;
     this.reporter            = reporter;
 }
 public CommandLineOptionHandler(
     IConfigFileGenerator configFileGenerator,
     IConfigReader configReader,
     IBaseReporter reporter,
     IFileSystemWrapper fileSystemWrapper)
 {
     this.configFileGenerator = configFileGenerator;
     this.configReader        = configReader;
     this.reporter            = reporter;
     this.fileSystemWrapper   = fileSystemWrapper;
 }
示例#8
0
 public SqlFileProcessor(IRuleVisitor ruleVisitor, IBaseReporter reporter)
     : this(ruleVisitor, reporter, new FileSystem())
 {
 }
 public LoadConfigFileStrategy(IBaseReporter reporter, FileSystem fileSystem)
 {
     this.reporter   = reporter;
     this.fileSystem = fileSystem;
 }
示例#10
0
 public PrintVersionStrategy(IBaseReporter reporter)
 {
     _reporter = reporter;
 }
 public CreateConfigFileStrategy(IBaseReporter reporter, IConfigFileGenerator configFileGenerator)
     : this(reporter, configFileGenerator, new FileSystem())
 {
 }
 public ValidatePathStrategy(IBaseReporter reporter, IFileSystemWrapper fileSystem)
 {
     this.reporter   = reporter;
     this.fileSystem = fileSystem;
 }
示例#13
0
 public PrintUsageStrategy(IBaseReporter reporter)
 {
     this.reporter = reporter;
 }
示例#14
0
 public PrintPluginsStrategy(IBaseReporter reporter, IConfigReader configReader)
 {
     this.reporter     = reporter;
     this.configReader = configReader;
 }
 public LoadConfigFileStrategy(IBaseReporter reporter)
     : this(reporter, new FileSystem())
 {
 }
示例#16
0
 public SqlFileProcessor(IRuleVisitor ruleVisitor, IBaseReporter reporter, IFileSystem fileSystem)
 {
     _ruleVisitor = ruleVisitor;
     _reporter    = reporter;
     _fileSystem  = fileSystem;
 }
示例#17
0
 public ConfigFileGenerator(IBaseReporter reporter)
 {
     Reporter = reporter;
 }
示例#18
0
 public PrintConfigStrategy(IBaseReporter reporter, IConfigReader configReader)
 {
     _reporter     = reporter;
     _configReader = configReader;
 }
示例#19
0
 public LoadConfigFileStrategy(IBaseReporter reporter, FileSystem fileSystem)
 {
     _reporter = reporter;
     _fileSystem = fileSystem;
 }