private readonly ITeamCityClient _teamCityClient; // TODO IMM HI: abstract away?

        #endregion Fields

        #region Constructors

        public AgentService(
            IDeploymentPipeline deploymentPipeline,
            IProjectInfoRepository projectInfoRepository,
            IEnvironmentInfoRepository environmentInfoRepository,
            ITeamCityClient teamCityClient,
            IDeploymentRequestRepository deploymentRequestRepository,
            IDiagnosticMessagesLogger diagnosticMessagesLogger,
            IProjectMetadataExplorer projectMetadataExplorer,
            IDirPathParamsResolver dirPathParamsResolver)
        {
            Guard.NotNull(deploymentPipeline, "deploymentPipeline");
              Guard.NotNull(projectInfoRepository, "projectInfoRepository");
              Guard.NotNull(environmentInfoRepository, "environmentInfoRepository");
              Guard.NotNull(teamCityClient, "teamCityClient");
              Guard.NotNull(deploymentRequestRepository, "deploymentRequestRepository");
              Guard.NotNull(diagnosticMessagesLogger, "diagnosticMessagesLogger");
              Guard.NotNull(dirPathParamsResolver, "dirPathParamsResolver");

              _projectInfoRepository = projectInfoRepository;
              _environmentInfoRepository = environmentInfoRepository;
              _teamCityClient = teamCityClient;
              _deploymentPipeline = deploymentPipeline;
              _deploymentRequestRepository = deploymentRequestRepository;
              _diagnosticMessagesLogger = diagnosticMessagesLogger;
              _projectMetadataExplorer = projectMetadataExplorer;
              _dirPathParamsResolver = dirPathParamsResolver;
        }
        public AgentService(
            IDeploymentPipeline deploymentPipeline,
            IProjectInfoRepository projectInfoRepository,
            IEnvironmentInfoRepository environmentInfoRepository,
            ITeamCityRestClient teamCityClient,
            IDeploymentRequestRepository deploymentRequestRepository,
            IDiagnosticMessagesLogger diagnosticMessagesLogger,
            IProjectMetadataExplorer projectMetadataExplorer,
            IDirPathParamsResolver dirPathParamsResolver,
            IApplicationConfiguration applicationConfiguration,
            IEnvironmentDeployInfoRepository environmentDeployInfoRepository,
            IEnvDeploymentPipeline envDeploymentPipeline)
        {
            Guard.NotNull(deploymentPipeline, "deploymentPipeline");
            Guard.NotNull(projectInfoRepository, "projectInfoRepository");
            Guard.NotNull(environmentInfoRepository, "environmentInfoRepository");
            Guard.NotNull(teamCityClient, "teamCityClient");
            Guard.NotNull(deploymentRequestRepository, "deploymentRequestRepository");
            Guard.NotNull(diagnosticMessagesLogger, "diagnosticMessagesLogger");
            Guard.NotNull(dirPathParamsResolver, "dirPathParamsResolver");
            Guard.NotNull(applicationConfiguration, "applicationConfiguration");
            Guard.NotNull(environmentDeployInfoRepository, "environmentDeployInfoRepository");
            Guard.NotNull(envDeploymentPipeline, "envDeploymentPipeline");

            _projectInfoRepository           = projectInfoRepository;
            _environmentInfoRepository       = environmentInfoRepository;
            _teamCityClient                  = teamCityClient;
            _deploymentPipeline              = deploymentPipeline;
            _deploymentRequestRepository     = deploymentRequestRepository;
            _diagnosticMessagesLogger        = diagnosticMessagesLogger;
            _projectMetadataExplorer         = projectMetadataExplorer;
            _dirPathParamsResolver           = dirPathParamsResolver;
            _applicationConfiguration        = applicationConfiguration;
            _environmentDeployInfoRepository = environmentDeployInfoRepository;
            _envDeploymentPipeline           = envDeploymentPipeline;
        }