99
1010namespace IntegrationEngine . Client
1111{
12+ /// <summary>
13+ /// In engine client.
14+ /// </summary>
1215 public class InEngineClient : IInEngineClient
1316 {
17+ /// <summary>
18+ /// Gets or sets the rest client.
19+ /// </summary>
20+ /// <value>The rest client.</value>
1421 public RestClient RestClient { get ; set ; }
1522
23+ /// <summary>
24+ /// Initializes a new instance of the <see cref="IntegrationEngine.Client.InEngineClient"/> class.
25+ /// </summary>
1626 public InEngineClient ( )
1727 : this ( "http://localhost:9001/api/" )
1828 {
1929 }
2030
31+ /// <summary>
32+ /// Initializes a new instance of the <see cref="IntegrationEngine.Client.InEngineClient"/> class.
33+ /// </summary>
34+ /// <param name="apiUrl">API URL.</param>
2135 public InEngineClient ( string apiUrl )
2236 {
2337 RestClient = new RestClient ( apiUrl ) ;
2438 }
2539
40+ /// <summary>
41+ /// Ping the server.
42+ /// </summary>
2643 public HttpStatusCode Ping ( )
2744 {
2845 return RestClient . Execute ( new RestRequest ( EndpointName . HealthStatus , Method . GET ) ) . StatusCode ;
2946 }
3047
3148 #region CronTrigger
49+ /// <summary>
50+ /// Gets the cron triggers.
51+ /// </summary>
52+ /// <returns>The cron triggers.</returns>
3253 public IList < CronTrigger > GetCronTriggers ( )
3354 {
3455 var request = new RestRequest ( EndpointName . CronTrigger , Method . GET ) ;
@@ -37,6 +58,11 @@ public IList<CronTrigger> GetCronTriggers()
3758 return JsonConvert . DeserializeObject < IList < CronTrigger > > ( result . Content ) ;
3859 }
3960
61+ /// <summary>
62+ /// Gets the cron trigger by identifier.
63+ /// </summary>
64+ /// <returns>The cron trigger by identifier.</returns>
65+ /// <param name="id">Identifier.</param>
4066 public CronTrigger GetCronTriggerById ( string id )
4167 {
4268 var request = new RestRequest ( EndpointName . CronTrigger + "/{id}" , Method . GET ) ;
@@ -45,6 +71,11 @@ public CronTrigger GetCronTriggerById(string id)
4571 return JsonConvert . DeserializeObject < CronTrigger > ( result . Content ) ;
4672 }
4773
74+ /// <summary>
75+ /// Creates the cron trigger.
76+ /// </summary>
77+ /// <returns>The cron trigger.</returns>
78+ /// <param name="cronTrigger">Cron trigger.</param>
4879 public CronTrigger CreateCronTrigger ( CronTrigger cronTrigger )
4980 {
5081 var request = new RestRequest ( EndpointName . CronTrigger , Method . POST ) ;
@@ -53,6 +84,11 @@ public CronTrigger CreateCronTrigger(CronTrigger cronTrigger)
5384 return JsonConvert . DeserializeObject < CronTrigger > ( result . Content ) ;
5485 }
5586
87+ /// <summary>
88+ /// Updates the cron trigger.
89+ /// </summary>
90+ /// <returns>The cron trigger.</returns>
91+ /// <param name="cronTrigger">Cron trigger.</param>
5692 public CronTrigger UpdateCronTrigger ( CronTrigger cronTrigger )
5793 {
5894 var request = new RestRequest ( EndpointName . CronTrigger + "/{id}" , Method . PUT ) ;
@@ -62,6 +98,11 @@ public CronTrigger UpdateCronTrigger(CronTrigger cronTrigger)
6298 return JsonConvert . DeserializeObject < CronTrigger > ( result . Content ) ;
6399 }
64100
101+ /// <summary>
102+ /// Deletes the cron trigger.
103+ /// </summary>
104+ /// <returns>The cron trigger.</returns>
105+ /// <param name="id">Identifier.</param>
65106 public CronTrigger DeleteCronTrigger ( string id )
66107 {
67108 var request = new RestRequest ( EndpointName . CronTrigger + "/{id}" , Method . DELETE ) ;
@@ -72,13 +113,22 @@ public CronTrigger DeleteCronTrigger(string id)
72113 #endregion
73114
74115 #region SimpleTrigger
116+ /// <summary>
117+ /// Gets the simple triggers.
118+ /// </summary>
119+ /// <returns>The simple triggers.</returns>
75120 public IList < SimpleTrigger > GetSimpleTriggers ( )
76121 {
77122 var request = new RestRequest ( EndpointName . SimpleTrigger , Method . GET ) ;
78123 var result = RestClient . Execute ( request ) ;
79124 return JsonConvert . DeserializeObject < IList < SimpleTrigger > > ( result . Content ) ;
80125 }
81126
127+ /// <summary>
128+ /// Gets the simple trigger by identifier.
129+ /// </summary>
130+ /// <returns>The simple trigger by identifier.</returns>
131+ /// <param name="id">Identifier.</param>
82132 public SimpleTrigger GetSimpleTriggerById ( string id )
83133 {
84134 var request = new RestRequest ( EndpointName . SimpleTrigger + "/{id}" , Method . GET ) ;
@@ -87,6 +137,11 @@ public SimpleTrigger GetSimpleTriggerById(string id)
87137 return JsonConvert . DeserializeObject < SimpleTrigger > ( result . Content ) ;
88138 }
89139
140+ /// <summary>
141+ /// Creates the simple trigger.
142+ /// </summary>
143+ /// <returns>The simple trigger.</returns>
144+ /// <param name="simpleTrigger">Simple trigger.</param>
90145 public SimpleTrigger CreateSimpleTrigger ( SimpleTrigger simpleTrigger )
91146 {
92147 var request = new RestRequest ( EndpointName . SimpleTrigger , Method . POST ) ;
@@ -95,6 +150,12 @@ public SimpleTrigger CreateSimpleTrigger(SimpleTrigger simpleTrigger)
95150 return JsonConvert . DeserializeObject < SimpleTrigger > ( result . Content ) ;
96151 }
97152
153+
154+ /// <summary>
155+ /// Updates the simple trigger.
156+ /// </summary>
157+ /// <returns>The simple trigger.</returns>
158+ /// <param name="simpleTrigger">Simple trigger.</param>
98159 public SimpleTrigger UpdateSimpleTrigger ( SimpleTrigger simpleTrigger )
99160 {
100161 var request = new RestRequest ( EndpointName . SimpleTrigger + "/{id}" , Method . PUT ) ;
@@ -104,6 +165,11 @@ public SimpleTrigger UpdateSimpleTrigger(SimpleTrigger simpleTrigger)
104165 return JsonConvert . DeserializeObject < SimpleTrigger > ( result . Content ) ;
105166 }
106167
168+ /// <summary>
169+ /// Deletes the simple trigger.
170+ /// </summary>
171+ /// <returns>The simple trigger.</returns>
172+ /// <param name="id">Identifier.</param>
107173 public SimpleTrigger DeleteSimpleTrigger ( string id )
108174 {
109175 var request = new RestRequest ( EndpointName . SimpleTrigger + "/{id}" , Method . DELETE ) ;
@@ -114,6 +180,10 @@ public SimpleTrigger DeleteSimpleTrigger(string id)
114180 #endregion
115181
116182 #region TimeZone
183+ /// <summary>
184+ /// Gets the time zones.
185+ /// </summary>
186+ /// <returns>The time zones.</returns>
117187 public IList < InEngineTimeZone > GetTimeZones ( )
118188 {
119189 var request = new RestRequest ( EndpointName . TimeZone , Method . GET ) ;
@@ -123,6 +193,10 @@ public IList<InEngineTimeZone> GetTimeZones()
123193 #endregion
124194
125195 #region JobType
196+ /// <summary>
197+ /// Gets the job types.
198+ /// </summary>
199+ /// <returns>The job types.</returns>
126200 public IList < JobType > GetJobTypes ( )
127201 {
128202 var request = new RestRequest ( EndpointName . JobType , Method . GET ) ;
@@ -132,6 +206,10 @@ public IList<JobType> GetJobTypes()
132206 #endregion
133207
134208 #region HealthStatus
209+ /// <summary>
210+ /// Gets the health status.
211+ /// </summary>
212+ /// <returns>The health status.</returns>
135213 public HealthStatus GetHealthStatus ( )
136214 {
137215 var request = new RestRequest ( EndpointName . HealthStatus , Method . GET ) ;
0 commit comments