Skip to content

Commit 145b147

Browse files
committed
refactors
1 parent 1ba3539 commit 145b147

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

SDK.CSharp.Example/Http/LiveControlDemo.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,17 @@ public async Task Start()
5555
while (true)
5656
{
5757
Console.Write("\rHold down enter to continue to send vibrates% ");
58-
Console.ReadLine();
58+
if (!string.IsNullOrEmpty(Console.ReadLine())) {
59+
Console.WriteLine("Exiting vibrate loop.");
60+
break;
61+
}
62+
5963
foreach (var configShocker in _config.Shockers)
6064
{
6165
liveControlClient.IntakeFrame(configShocker, ControlType.Vibrate, 50);
6266
}
6367
}
68+
69+
await liveControlClient.DisposeAsync();
6470
}
6571
}

SDK.CSharp.Tests/ClientUtils.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
using System;
2-
using System.IO;
3-
using System.Net;
4-
using System.Net.Http;
1+
using System.Net;
52
using System.Net.Mime;
63
using System.Text;
7-
using System.Threading.Tasks;
8-
using OpenShock.SDK.CSharp;
94

10-
namespace SDK.CSharp.Tests;
5+
namespace OpenShock.SDK.CSharp.Tests;
116

127
public static class ClientUtils
138
{

SDK.CSharp.Tests/HttpMessageHandlerStub.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
2-
using System.Net.Http;
3-
using System.Threading;
4-
using System.Threading.Tasks;
5-
6-
namespace SDK.CSharp.Tests;
1+
namespace OpenShock.SDK.CSharp.Tests;
72

83
public class HttpMessageHandlerStub : HttpMessageHandler
94
{

SDK.CSharp.Tests/TestShockerEndpoints.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
using System.Threading.Tasks;
1+
using TUnit.Assertions;
2+
using TUnit.Core;
23

3-
namespace SDK.CSharp.Tests;
4+
namespace OpenShock.SDK.CSharp.Tests;
45

56
public sealed class TestShockerEndpoints
67
{

0 commit comments

Comments
 (0)