public static IDataFlowConnection CreateConnection(string jobManagerConfigurationName, string repositoryConfigurationName)
        {
            var repositoryClientFactory = new RepositoryClientFactory();
            var jobManagerClientFactory = new JobManagerClientFactory();

            return new DataFlowConnection(
                jobManagerClientFactory.CreateClient(JobManagerCallback, jobManagerConfigurationName),
                repositoryClientFactory.CreateClient(repositoryConfigurationName));
        }
        public static IDataFlowConnection CreateDefaultConnection()
        {
            var repositoryClientFactory = new RepositoryClientFactory();
            var jobManagerClientFactory = new JobManagerClientFactory();

            return new DataFlowConnection(
                jobManagerClientFactory.CreateClient(JobManagerCallback),
                repositoryClientFactory.CreateClient());
        }
Exemple #3
0
        private static void ExecuteJob(Japi.Job job)
        {
            var stagesProvider = new StagesProvider();
            var repositoryClientFactory = new RepositoryClientFactory();
            var jobManagerClientFactory = new JobManagerClientFactory();

            using(var repository = repositoryClientFactory.CreateClient())
            {
                using(var jobManager = jobManagerClientFactory.CreateClient(new JobManagerCallback()))
                {
                    foreach(var stage in stagesProvider.Stages)
                    {
                        Console.WriteLine(stage.Name + "...");
                        stage.Execute(job, Console.WriteLine, repository, jobManager);
                    }
                }
            }
        }