Skip to content

Commit 316776c

Browse files
committed
style: fix doc issues for Connectors
1 parent eb3f66c commit 316776c

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

Connection/RESTConnector.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public bool? DisableSslVerification
258258
/// <summary>
259259
/// This function returns a RESTConnector object for the given service and function.
260260
/// </summary>
261-
/// <param name="serviceID">The ID of the service.</param>
261+
/// <param name="authenticator">The ID of the service.</param>
262262
/// <param name="function">The name of the function.</param>
263263
/// <returns>Returns a RESTConnector object or null on error.</returns>
264264
///
@@ -306,29 +306,28 @@ public bool Send(Request request)
306306
/// <summary>
307307
/// Authenticate based on bearer token
308308
/// </summary>
309-
/// <param name="request">The request object.</param>
310-
/// <returns>true is returned on success, false is returned if the Request can't be sent.</returns>
309+
/// <param name="bearerToken">The bearer token to authenticate.</param>
311310
public void WithAuthentication(string bearerToken)
312311
{
313312
if (Headers == null)
314313
{
315314
Headers = new Dictionary<string,string>();;
316315
}
317-
Headers.Add("Authorization", string.Format("Bearer {0}", bearerToken));
316+
Headers.Add(AUTHENTICATION_AUTHORIZATION_HEADER, string.Format("Bearer {0}", bearerToken));
318317
}
319318

320319
/// <summary>
321320
/// Authenticate based on bearer token
322321
/// </summary>
323-
/// <param name="request">The request object.</param>
324-
/// <returns>true is returned on success, false is returned if the Request can't be sent.</returns>
322+
/// <param name="username">Username</param>
323+
/// <param name="password">Password.</param>
325324
public void WithAuthentication(string username, string password)
326325
{
327326
if (Headers == null)
328327
{
329328
Headers = new Dictionary<string,string>();;
330329
}
331-
Headers.Add("Authorization", Utility.CreateAuthorization(username, password));
330+
Headers.Add(AUTHENTICATION_AUTHORIZATION_HEADER, Utility.CreateAuthorization(username, password));
332331
}
333332
#endregion
334333

Connection/WSConnector.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,29 +144,28 @@ public TextMessage(string text, Dictionary<string, string> headers = null)
144144
/// <summary>
145145
/// Authenticate based on bearer token
146146
/// </summary>
147-
/// <param name="request">The request object.</param>
148-
/// <returns>true is returned on success, false is returned if the Request can't be sent.</returns>
147+
/// <param name="bearerToken">The bearer token to authenticate.</param>
149148
public void WithAuthentication(string bearerToken)
150149
{
151150
if (Headers == null)
152151
{
153152
Headers = new Dictionary<string,string>();;
154153
}
155-
Headers.Add("Authorization", string.Format("Bearer {0}", bearerToken));
154+
Headers.Add(AUTHENTICATION_AUTHORIZATION_HEADER, string.Format("Bearer {0}", bearerToken));
156155
}
157156

158157
/// <summary>
159158
/// Authenticate based on bearer token
160159
/// </summary>
161-
/// <param name="request">The request object.</param>
162-
/// <returns>true is returned on success, false is returned if the Request can't be sent.</returns>
160+
/// <param name="username">Username</param>
161+
/// <param name="password">Password.</param>
163162
public void WithAuthentication(string username, string password)
164163
{
165164
if (Headers == null)
166165
{
167166
Headers = new Dictionary<string,string>();;
168167
}
169-
Headers.Add("Authorization", Utility.CreateAuthorization(username, password));
168+
Headers.Add(AUTHENTICATION_AUTHORIZATION_HEADER, Utility.CreateAuthorization(username, password));
170169
}
171170
#endregion
172171

Utilities/Utility.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,8 +1241,7 @@ public static List<string> GetCredentialsPaths()
12411241
#region String to Double
12421242
public static double StringToDouble(string input)
12431243
{
1244-
double output;
1245-
double.TryParse(input, out output);
1244+
double.TryParse(input, out double output);
12461245
return output;
12471246
}
12481247
#endregion

0 commit comments

Comments
 (0)