private static BuildStepViewModel MapToBuildStepViewModel(BuildStep step) { return new BuildStepViewModel { StatusText = step.IsSuccessful ? "OK" : "Failed", StepName = step.StepName, CssClass = step.IsSuccessful ? "BuildGreen" : "BuildRed" }; }
public void AddStep(BuildStep buildStep) { // Removing any existing steps with the same name: BuildStep existing = _buildSteps.FirstOrDefault( s => s.StepName == buildStep.StepName); if (existing != null) { _buildSteps.Remove(existing); } // Adding the new step: _buildSteps.Add(buildStep); }