コード例 #1
0
        public void Act()
        {
            var viewRemover       = new ViewRemover(_connectionStringSettings);
            var connectionFactory = new DataConnectionFactory(_connectionStringSettings);
            var runner            = new BulkReplicationRunner(DefaultProvider, connectionFactory, viewRemover);

            runner.Run(_key.Key);
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            var connectionStringSettings = new StateInitializationConnectionStringSettings(ConfigurationManager.ConnectionStrings);
            var viewRemover       = new ViewRemover(connectionStringSettings);
            var connectionFactory = new DataConnectionFactory(connectionStringSettings);
            var runner            = new BulkReplicationRunner(DefaultProvider, connectionFactory, viewRemover);

            foreach (var mode in args)
            {
                var sw = Stopwatch.StartNew();
                runner.Run(mode);
                Console.WriteLine($"{mode}, {sw.ElapsedMilliseconds}ms");
            }
        }
コード例 #3
0
 public BulkReplicationRunner(IMetadataProvider metadataProvider, DataConnectionFactory dataConnectionFactory, ViewRemover viewRemover)
 {
     _metadataProvider      = metadataProvider;
     _dataConnectionFactory = dataConnectionFactory;
     _viewRemover           = viewRemover;
 }