Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor tidy-up to GetStatus() to make it more stable.

  • Loading branch information...
commit a69121e170c9ed2d9c6db608b1549ab4e84dc534 1 parent 1c406f7
@csut017 csut017 authored
View
17 Playground/CruiseControl.Common/Messages/ProjectStatus.cs
@@ -2,15 +2,30 @@
{
using System;
+ /// <summary>
+ /// The current status of the project.
+ /// </summary>
public class ProjectStatus
{
#region Public properties
#region Status
+ /// <summary>
+ /// Gets or sets the current status.
+ /// </summary>
+ /// <value>
+ /// The current status.
+ /// </value>
public string Status { get; set; }
#endregion
#region LastBuildDate
- public DateTime LastBuildDate { get; set; }
+ /// <summary>
+ /// Gets or sets the last build date.
+ /// </summary>
+ /// <value>
+ /// The last build date.
+ /// </value>
+ public DateTime? LastBuildDate { get; set; }
#endregion
#endregion
}
View
8 Playground/CruiseControl.Core/Project.cs
@@ -490,9 +490,13 @@ public virtual Messages.ProjectStatus GetStatus(Messages.Blank request)
{
var response = new Messages.ProjectStatus
{
- Status = this.State.ToString(),
- LastBuildDate = this.PersistedState.LastIntegration.FinishTime
+ Status = this.State.ToString()
};
+ if ((this.PersistedState != null) && (this.PersistedState.LastIntegration != null))
+ {
+ response.LastBuildDate = this.PersistedState.LastIntegration.FinishTime;
+ }
+
return response;
}
#endregion
Please sign in to comment.
Something went wrong with that request. Please try again.