예제 #1
0
 public Overseer(CancellationToken token, BuildServerClient buildServerClient, GitHubClient gitHubClient, string user, string repo, string branch)
 {
     m_token = token;
     m_buildServerClient = buildServerClient;
     m_gitHubClient = gitHubClient;
     m_user = user;
     m_repo = repo;
     m_branch = branch;
 }
예제 #2
0
        internal void Start()
        {
            Log.Info("Starting service.");

            m_tokenSource = new CancellationTokenSource();
            BuildServerClient buildServerClient = new BuildServerClient(m_tokenSource.Token);
            Overseer overseer = new Overseer(m_tokenSource.Token, buildServerClient, m_gitHubClient, "Build", "Configuration", "master");
            m_task = Task.Factory.StartNew(Program.FailOnException<object>(overseer.Run), m_tokenSource, TaskCreationOptions.LongRunning);
        }
예제 #3
0
파일: Watcher.cs 프로젝트: etihwddot/Leeroy
 public Watcher(BuildProject project, BuildServerClient buildServerClient, GitHubClient gitHubClient, CancellationToken token)
 {
     m_project = project;
     m_buildServerClient = buildServerClient;
     m_gitHubClient = gitHubClient;
     SplitRepoUrl(m_project.RepoUrl, out m_server, out m_user, out m_repo);
     m_branch = m_project.Branch ?? "master";
     m_token = token;
     m_submodules = new Dictionary<string, Submodule>();
     Log = LogManager.GetLogger("Watcher/{0}".FormatInvariant(m_project.Name));
     Log.Info("Watching '{0}' branch in {1}/{2}.", m_branch, m_user, m_repo);
 }