@@ -14,25 +14,34 @@ public abstract class BuildMonitorModelHandlerBase : IBuildMonitorModelHandler
14
14
protected readonly string buildTypesUrl ;
15
15
protected readonly string runningBuildsUrl ;
16
16
protected readonly string buildStatusUrl ;
17
- protected readonly string buildQueueUrl ;
17
+ protected readonly string buildStatisticsUrl ;
18
+ protected readonly string buildQueueUrl ;
18
19
protected Dictionary < string , dynamic > runningBuilds ;
19
20
20
21
protected dynamic projectsJson ;
21
22
protected dynamic buildTypesJson ;
22
23
protected dynamic buildQueueJson ;
23
24
protected dynamic buildStatusJson ;
25
+ protected dynamic buildStatisticsJson ;
24
26
25
- protected BuildMonitorModelHandlerBase ( )
27
+ /// <summary>
28
+ /// Initializes a new instance of the <see cref="BuildMonitorModelHandlerBase"/> class.
29
+ /// </summary>
30
+ protected BuildMonitorModelHandlerBase ( )
26
31
{
27
32
teamCityUrl = ConfigurationManager . AppSettings [ "teamcity_api_url" ] ;
28
33
projectsUrl = teamCityUrl + ConfigurationManager . AppSettings [ "teamcity_api_projects" ] ;
29
34
buildTypesUrl = teamCityUrl + ConfigurationManager . AppSettings [ "teamcity_api_buildtypes" ] ;
30
35
runningBuildsUrl = teamCityUrl + ConfigurationManager . AppSettings [ "teamcity_api_runningbuilds" ] ;
31
36
buildStatusUrl = teamCityUrl + ConfigurationManager . AppSettings [ "teamcity_api_buildstatus" ] ;
32
- buildQueueUrl = teamCityUrl + ConfigurationManager . AppSettings [ "teamcity_api_buildqueue" ] ;
37
+ buildStatisticsUrl = teamCityUrl + ConfigurationManager . AppSettings [ "teamcity_api_buildstatistics" ] ;
38
+ buildQueueUrl = teamCityUrl + ConfigurationManager . AppSettings [ "teamcity_api_buildqueue" ] ;
33
39
}
34
40
35
- protected void GetTeamCityBuildsJson ( )
41
+ /// <summary>
42
+ /// Gets the team city builds json.
43
+ /// </summary>
44
+ protected void GetTeamCityBuildsJson ( )
36
45
{
37
46
var projectsJsonString = RequestHelper . GetJson ( projectsUrl ) ;
38
47
projectsJson = JsonConvert . DeserializeObject < dynamic > ( projectsJsonString ) ;
@@ -46,7 +55,10 @@ protected void GetTeamCityBuildsJson()
46
55
UpdateRunningBuilds ( ) ;
47
56
}
48
57
49
- private void UpdateRunningBuilds ( )
58
+ /// <summary>
59
+ /// Updates the running builds.
60
+ /// </summary>
61
+ private void UpdateRunningBuilds ( )
50
62
{
51
63
try
52
64
{
@@ -74,12 +86,21 @@ private void UpdateRunningBuilds()
74
86
}
75
87
}
76
88
77
- protected void UpdateBuildStatusFromRunningBuildJson ( string buildId )
89
+ /// <summary>
90
+ /// Updates the build status from running build json.
91
+ /// </summary>
92
+ /// <param name="buildId">The build identifier.</param>
93
+ protected void UpdateBuildStatusFromRunningBuildJson ( string buildId )
78
94
{
79
95
buildStatusJson = runningBuilds [ buildId ] ;
80
96
}
81
97
82
- protected BuildStatus GetBuildStatusForRunningBuild ( string buildId )
98
+ /// <summary>
99
+ /// Gets the build status for running build.
100
+ /// </summary>
101
+ /// <param name="buildId">The build identifier.</param>
102
+ /// <returns></returns>
103
+ protected BuildStatus GetBuildStatusForRunningBuild ( string buildId )
83
104
{
84
105
if ( runningBuilds . ContainsKey ( buildId ) )
85
106
{
@@ -107,7 +128,12 @@ protected BuildStatus GetBuildStatusForRunningBuild(string buildId)
107
128
}
108
129
}
109
130
110
- protected string [ ] GetRunningBuildBranchAndProgress ( string buildId )
131
+ /// <summary>
132
+ /// Gets the running build branch and progress.
133
+ /// </summary>
134
+ /// <param name="buildId">The build identifier.</param>
135
+ /// <returns></returns>
136
+ protected string [ ] GetRunningBuildBranchAndProgress ( string buildId )
111
137
{
112
138
var result = new [ ]
113
139
{
@@ -131,7 +157,11 @@ protected string[] GetRunningBuildBranchAndProgress(string buildId)
131
157
132
158
public abstract BuildMonitorViewModel GetModel ( ) ;
133
159
134
- protected string GetLastRunText ( )
160
+ /// <summary>
161
+ /// Gets the last run text.
162
+ /// </summary>
163
+ /// <returns></returns>
164
+ protected string GetLastRunText ( )
135
165
{
136
166
const int second = 1 ;
137
167
const int minute = 60 * second ;
0 commit comments