Skip to content

Commit 9d8e7ef

Browse files
committed
style: fix doc issues for Connectors
1 parent eb3f66c commit 9d8e7ef

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

Connection/RESTConnector.cs

Lines changed: 8 additions & 9 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">Authenticator used to authenticate service.</param>
262262
/// <param name="function">The name of the function.</param>
263263
/// <returns>Returns a RESTConnector object or null on error.</returns>
264264
///
@@ -304,31 +304,30 @@ public bool Send(Request request)
304304

305305
#region Authenticate request
306306
/// <summary>
307-
/// Authenticate based on bearer token
307+
/// Add Authentication headers
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>
321-
/// Authenticate based on bearer token
320+
/// Add Authentication headers
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: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,31 +142,30 @@ public TextMessage(string text, Dictionary<string, string> headers = null)
142142

143143
#region Authenticate request
144144
/// <summary>
145-
/// Authenticate based on bearer token
145+
/// Add Authentication headers
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>
159-
/// Authenticate based on bearer token
158+
/// Add Authentication headers
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

@@ -325,7 +324,7 @@ public static string FixupURL(string URL)
325324
/// <summary>
326325
/// Create a WSConnector for the given service and function.
327326
/// </summary>
328-
/// <param name="authenticator">The credentials for the service.</param>
327+
/// <param name="authenticator">The authenticator for the service.</param>
329328
/// <param name="function">The name of the function to connect.</param>
330329
/// <param name="args">Additional function arguments.</param>
331330
/// <returns>The WSConnector object or null or error.</returns>

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)