/// <summary> /// When implemented in a derived class, performs the execution of the activity. /// </summary> protected override void InternalExecute() { IBuildAgent buildAgent = this.BuildAgent.Get(this.ActivityContext); string tag = this.Tag.Get(this.ActivityContext); switch (this.action) { case TagAction.Add: buildAgent.Tags.Add(tag); buildAgent.Save(); break; case TagAction.Remove: buildAgent.Tags.Remove(tag); buildAgent.Save(); break; } }
public void EnableAgent(IBuildAgent agent) { agent.Enabled = true; agent.Save(); }
public void DisableAgent(IBuildAgent agent) { agent.Enabled = false; agent.Save(); }