예제 #1
0
        static void Main(string[] args)
        {
            var appsettings = new AppSettings();
            var tfsClient = new TfsClient(appsettings);
            IChangeNotifier changeNotifier = new SlackChangeNotifier(appsettings);
            var changeDetector = new ChangeDetector(tfsClient, changeNotifier);

            HostFactory.Run(x =>
            {
                x.UseLog4Net();
                XmlConfigurator.Configure();
                x.Service<ChangePoller>(s =>
                {
                    s.ConstructUsing(name => new ChangePoller(changeDetector, appsettings));
                    s.WhenStarted(c => c.Start());
                    s.WhenStopped(c => c.Stop());
                });
                x.RunAsLocalSystem();

                x.SetDescription("Polling TFS for builds");
                x.SetDisplayName("TfsToSlack");
                x.SetServiceName("TfsToSlack");
            });
        }
예제 #2
0
        static void Main(string[] args)
        {
            var             appsettings    = new AppSettings();
            var             tfsClient      = new TfsClient(appsettings);
            IChangeNotifier changeNotifier = new SlackChangeNotifier(appsettings);
            var             changeDetector = new ChangeDetector(tfsClient, changeNotifier);

            HostFactory.Run(x =>
            {
                x.UseLog4Net();
                XmlConfigurator.Configure();
                x.Service <ChangePoller>(s =>
                {
                    s.ConstructUsing(name => new ChangePoller(changeDetector, appsettings));
                    s.WhenStarted(c => c.Start());
                    s.WhenStopped(c => c.Stop());
                });
                x.RunAsLocalSystem();

                x.SetDescription("Polling TFS for builds");
                x.SetDisplayName("TfsToSlack");
                x.SetServiceName("TfsToSlack");
            });
        }
예제 #3
0
 public ChangePoller(ChangeDetector changeDetector, ITfsPollerConfiguration configuration)
 {
     _changeDetector = changeDetector;
     _configuration  = configuration;
 }
예제 #4
0
 public ChangePoller(ChangeDetector changeDetector, ITfsPollerConfiguration configuration)
 {
     _changeDetector = changeDetector;
     _configuration = configuration;
 }