public int StartDeployingAgent(AgentDeploymentSettings settings)
        {
            AgentDeployer.log.Debug((object)"StartDeployingAgent entered");
            AgentDeploymentWatcher instance = AgentDeploymentWatcher.GetInstance(this.agentInfoDal);

            instance.Start();
            int agentId = this.DeployAgent(settings);

            instance.AddOrUpdateDeploymentInfo(AgentDeploymentInfo.Calculate(new AgentManager(this.agentInfoDal).GetAgentInfo(agentId), (IEnumerable <string>)settings.get_RequiredPlugins(), (string)null));
            this.DeployMissingPlugins(agentId, (IEnumerable <string>)settings.get_RequiredPlugins());
            return(agentId);
        }
示例#2
0
        // Token: 0x06000901 RID: 2305 RVA: 0x00040F7C File Offset: 0x0003F17C
        public int StartDeployingAgent(AgentDeploymentSettings settings)
        {
            AgentDeployer.log.Debug("StartDeployingAgent entered");
            AgentDeploymentWatcher instance = AgentDeploymentWatcher.GetInstance(this.agentInfoDal);

            instance.Start();
            int       num       = this.DeployAgent(settings);
            AgentInfo agentInfo = new AgentManager(this.agentInfoDal).GetAgentInfo(num);

            instance.AddOrUpdateDeploymentInfo(AgentDeploymentInfo.Calculate(agentInfo, settings.RequiredPlugins, null));
            this.DeployMissingPlugins(num, settings.RequiredPlugins);
            return(num);
        }
示例#3
0
        // Token: 0x06000902 RID: 2306 RVA: 0x00040FE4 File Offset: 0x0003F1E4
        public void StartDeployingPlugins(int agentId, IEnumerable <string> requiredPlugins, Action <AgentDeploymentStatus> onFinishedCallback = null)
        {
            AgentDeployer.log.Debug("StartDeployingPlugins entered");
            AgentDeploymentInfo agentDeploymentInfo = AgentDeploymentInfo.Calculate(new AgentManager(this.agentInfoDal).GetAgentInfo(agentId), requiredPlugins, null);

            agentDeploymentInfo.StatusInfo = new AgentDeploymentStatusInfo(agentId, AgentDeploymentStatus.InProgress);
            AgentDeploymentWatcher instance = AgentDeploymentWatcher.GetInstance(this.agentInfoDal);

            instance.AddOrUpdateDeploymentInfo(agentDeploymentInfo);
            if (onFinishedCallback != null)
            {
                instance.SetOnFinishedCallback(agentId, onFinishedCallback);
            }
            this.DeployMissingPlugins(agentId, requiredPlugins);
        }
 public static AgentDeploymentWatcher GetInstance(
     IAgentInfoDAL agentInfoDal)
 {
     if (AgentDeploymentWatcher.instance != null)
     {
         return(AgentDeploymentWatcher.instance);
     }
     lock (AgentDeploymentWatcher.syncLockInstance)
     {
         if (AgentDeploymentWatcher.instance == null)
         {
             AgentDeploymentWatcher.instance = new AgentDeploymentWatcher(agentInfoDal);
         }
     }
     return(AgentDeploymentWatcher.instance);
 }