public SqlServerDeployer(IScriptDeployerConfig config, IProject project, ISqlConnectionManager connectionManager, ILoggerSync logger)
            : base(config, project)
        {
            if (project == null)
                throw new ArgumentNullException("project");
            if (connectionManager == null)
                throw new ArgumentNullException("connectionManager");

            _connectionManager = connectionManager;
            _logger = logger ?? new NullLogger();
            _patternLookup = new CatalogPatternLookup();
        }
        public ScriptFileDeployer(IScriptDeployerConfig config, IProject project, ISqlConnectionManager connectionManager, ILogger logger)
            : base(config, project)
        {
            if (project == null)
                throw new ArgumentNullException("project");

            _connectionManager = connectionManager;
            _logger = logger ?? new NullLogger();
            _patternLookup = new CatalogPatternLookup();

            var fileName = string.Format("{0}_{1}_v{2}.sql", connectionManager.Server, project.Configuration.Project, project.Configuration.Version.Replace('.', '-'));
            var path = Path.Combine("G:\\", fileName);
            _writer = new StreamWriter(File.Create(path, 16384, FileOptions.Asynchronous));

            _writer.WriteLine("-- Generated {0} on {1} by {2}", DateTime.Now, Environment.MachineName, Environment.UserName);
        }