Skip to content

Commit 209bb89

Browse files
committed
Complete code comments
1 parent 7e1139e commit 209bb89

File tree

2 files changed

+82
-76
lines changed

2 files changed

+82
-76
lines changed

AdvancedSharpAdbClient/Interfaces/IAdbClient.Async.cs

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public partial interface IAdbClient
4444
/// Asks the ADB server to forward local connections from <paramref name="local"/>
4545
/// to the <paramref name="remote"/> address on the <paramref name="device"/>.
4646
/// </summary>
47-
/// <param name="device">The device to which to forward the connections.</param>
47+
/// <param name="device">The device on which to forward the connections.</param>
4848
/// <param name="local">
4949
/// <para>
5050
/// The local address to forward. This value can be in one of:
@@ -88,7 +88,7 @@ public partial interface IAdbClient
8888
/// Asks the ADB server to forward local connections from <paramref name="local"/>
8989
/// to the <paramref name="remote"/> address on the <paramref name="device"/>.
9090
/// </summary>
91-
/// <param name="device">The device to which to forward the connections.</param>
91+
/// <param name="device">The device on which to forward the connections.</param>
9292
/// <param name="local">
9393
/// <para>
9494
/// The local address to forward. This value can be in one of:
@@ -130,7 +130,7 @@ public partial interface IAdbClient
130130
/// Asks the ADB server to reverse forward local connections from <paramref name="remote"/>
131131
/// to the <paramref name="local"/> address on the <paramref name="device"/>.
132132
/// </summary>
133-
/// <param name="device">The device to which to reverse forward the connections.</param>
133+
/// <param name="device">The device on which to reverse forward the connections.</param>
134134
/// <param name="remote">
135135
/// <para>
136136
/// The remote address to reverse forward. This value can be in one of:
@@ -428,42 +428,42 @@ public partial interface IAdbClient
428428
/// <summary>
429429
/// Clicks on the specified coordinates.
430430
/// </summary>
431-
/// <param name="device"></param>
432-
/// <param name="cords"></param>
431+
/// <param name="device">The device on which to click.</param>
432+
/// <param name="cords">The <see cref="Cords"/> to click.</param>
433433
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
434434
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
435435
Task ClickAsync(DeviceData device, Cords cords, CancellationToken cancellationToken);
436436

437437
/// <summary>
438438
/// Clicks on the specified coordinates.
439439
/// </summary>
440-
/// <param name="device"></param>
441-
/// <param name="x"></param>
442-
/// <param name="y"></param>
440+
/// <param name="device">The device on which to click.</param>
441+
/// <param name="x">The X co-ordinate to click.</param>
442+
/// <param name="y">The Y co-ordinate to click.</param>
443443
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
444444
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
445445
Task ClickAsync(DeviceData device, int x, int y, CancellationToken cancellationToken);
446446

447447
/// <summary>
448448
/// Generates a swipe gesture from first element to second element Specify the speed in ms.
449449
/// </summary>
450-
/// <param name="device"></param>
451-
/// <param name="first"></param>
452-
/// <param name="second"></param>
453-
/// <param name="speed"></param>
450+
/// <param name="device">The device on which to swipe.</param>
451+
/// <param name="first">The start element.</param>
452+
/// <param name="second">The end element.</param>
453+
/// <param name="speed">The time spent in swiping.</param>
454454
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
455455
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
456456
Task SwipeAsync(DeviceData device, Element first, Element second, long speed, CancellationToken cancellationToken);
457457

458458
/// <summary>
459459
/// Generates a swipe gesture from co-ordinates x1,y1 to x2,y2 with speed Specify the speed in ms.
460460
/// </summary>
461-
/// <param name="device"></param>
462-
/// <param name="x1"></param>
463-
/// <param name="y1"></param>
464-
/// <param name="x2"></param>
465-
/// <param name="y2"></param>
466-
/// <param name="speed"></param>
461+
/// <param name="device">The device on which to swipe.</param>
462+
/// <param name="x1">The start X co-ordinate.</param>
463+
/// <param name="y1">The start Y co-ordinate.</param>
464+
/// <param name="x2">The end X co-ordinate.</param>
465+
/// <param name="y2">The end Y co-ordinate.</param>
466+
/// <param name="speed">The time spent in swiping.</param>
467467
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
468468
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
469469
Task SwipeAsync(DeviceData device, int x1, int y1, int x2, int y2, long speed, CancellationToken cancellationToken);
@@ -500,75 +500,77 @@ public partial interface IAdbClient
500500
/// </summary>
501501
/// <param name="device"></param>
502502
/// <param name="xpath"></param>
503-
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
503+
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
504+
/// Only check once if <see langword="default"/>. Or it will continue check until <see cref="CancellationToken.IsCancellationRequested"/> is <see langword="true"/>.</param>
504505
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
505506
Task<Element> FindElementAsync(DeviceData device, string xpath, CancellationToken cancellationToken);
506507

507508
/// <summary>
508509
/// Get elements by xpath asynchronously. You can specify the waiting time in timeout.
509510
/// </summary>
510-
/// <param name="device"></param>
511-
/// <param name="xpath"></param>
512-
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
511+
/// <param name="device">The device on which to get elements.</param>
512+
/// <param name="xpath">The xpath of the elements.</param>
513+
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
514+
/// Only check once if <see langword="default"/>. Or it will continue check until <see cref="CancellationToken.IsCancellationRequested"/> is <see langword="true"/>.</param>
513515
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
514516
Task<Element[]> FindElementsAsync(DeviceData device, string xpath, CancellationToken cancellationToken);
515517

516518
/// <summary>
517-
/// Send keyevent to specific. You can see keyevents here https://developer.android.com/reference/android/view/KeyEvent.
519+
/// Send key event to specific. You can see key events here https://developer.android.com/reference/android/view/KeyEvent.
518520
/// </summary>
519-
/// <param name="device"></param>
520-
/// <param name="key"></param>
521+
/// <param name="device">The device on which to send key event.</param>
522+
/// <param name="key">The key event to send.</param>
521523
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
522524
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
523525
Task SendKeyEventAsync(DeviceData device, string key, CancellationToken cancellationToken);
524526

525527
/// <summary>
526528
/// Send text to device. Doesn't support Russian.
527529
/// </summary>
528-
/// <param name="device"></param>
529-
/// <param name="text"></param>
530+
/// <param name="device">The device on which to send text.</param>
531+
/// <param name="text">The text to send.</param>
530532
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
531533
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
532534
Task SendTextAsync(DeviceData device, string text, CancellationToken cancellationToken);
533535

534536
/// <summary>
535-
/// Clear the input text. The input should be in focus. Use el.ClearInput() if the element isn't focused.
537+
/// Clear the input text. The input should be in focus. Use <see cref="Element.ClearInputAsync(int, CancellationToken)"/> if the element isn't focused.
536538
/// </summary>
537-
/// <param name="device"></param>
538-
/// <param name="charcount"></param>
539+
/// <param name="device">The device on which to clear the input text.</param>
540+
/// <param name="charCount">The length of text to clear.</param>
539541
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
540542
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
541-
Task ClearInputAsync(DeviceData device, int charcount, CancellationToken cancellationToken);
543+
Task ClearInputAsync(DeviceData device, int charCount, CancellationToken cancellationToken);
542544

543545
/// <summary>
544546
/// Start an Android application on device.
545547
/// </summary>
546-
/// <param name="device"></param>
547-
/// <param name="packagename"></param>
548+
/// <param name="device">The device on which to start an application.</param>
549+
/// <param name="packageName">The package name of the application to start.</param>
548550
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
549551
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
550-
Task StartAppAsync(DeviceData device, string packagename, CancellationToken cancellationToken);
552+
Task StartAppAsync(DeviceData device, string packageName, CancellationToken cancellationToken);
551553

552554
/// <summary>
553555
/// Stop an Android application on device.
554556
/// </summary>
555-
/// <param name="device"></param>
556-
/// <param name="packagename"></param>
557+
/// <param name="device">The device on which to stop an application.</param>
558+
/// <param name="packageName">The package name of the application to stop.</param>
557559
/// <param name="cancellationToken">A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.</param>
558560
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
559-
Task StopAppAsync(DeviceData device, string packagename, CancellationToken cancellationToken);
561+
Task StopAppAsync(DeviceData device, string packageName, CancellationToken cancellationToken);
560562

561563
/// <summary>
562564
/// Click BACK button.
563565
/// </summary>
564-
/// <param name="device"></param>
566+
/// <param name="device">The device on which to click BACK button.</param>
565567
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
566568
Task BackBtnAsync(DeviceData device);
567569

568570
/// <summary>
569571
/// Click HOME button.
570572
/// </summary>
571-
/// <param name="device"></param>
573+
/// <param name="device">The device on which to click HOME button.</param>
572574
/// <returns>A <see cref="Task"/> which represents the asynchronous operation.</returns>
573575
Task HomeBtnAsync(DeviceData device);
574576
}

0 commit comments

Comments
 (0)