public BuildStatus(XElement projectElement)
{
ParameterCheck.ParameterRequired(projectElement, "projectElement");
try
{
LastBuildStatus = GetAttributeValue(projectElement, "lastBuildStatus");
Name = GetAttributeValue(projectElement, "name");
if (Name != null)
{
var nameParts = Regex.Split(Name, "::");
if (nameParts.Length == 2)
{
Project = nameParts[0].Trim();
Configuration = nameParts[1].Trim();
}
}
Activity = GetAttributeValue(projectElement, "activity");
foreach (var xAttribute in projectElement.Attributes())
{
logger.Debug("{0} = {1}", xAttribute.Name, xAttribute.Value);
}
}
catch (Exception err)
{
logger.ErrorException(string.Format("Error parsing TeamCity project node {0}", projectElement), err);
}
}