Skip to content

Commit c4cd288

Browse files
Merge pull request #80 from nullinside-development-group/chore/formatting
chore: formatting
2 parents 5255f36 + 9c506bb commit c4cd288

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/Nullinside.Api.Common/Nullinside.Api.Common.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="log4net" Version="3.0.4" />
21-
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.4" />
20+
<PackageReference Include="log4net" Version="3.0.4"/>
21+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.4"/>
2222
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
23-
<PackageReference Include="SSH.NET" Version="2025.0.0" />
23+
<PackageReference Include="SSH.NET" Version="2025.0.0"/>
2424
<PackageReference Include="TwitchLib.Api" Version="3.9.0"/>
2525
<PackageReference Include="TwitchLib.Client" Version="3.3.1"/>
2626
</ItemGroup>

src/Nullinside.Api.Common/Twitch/TwitchClientProxy.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ public class TwitchClientProxy : ITwitchClientProxy {
2929
/// </summary>
3030
private static TwitchClientProxy? instance;
3131

32+
/// <summary>
33+
/// The callback(s) to invoke when a new instance is created.
34+
/// </summary>
35+
private static Action<TwitchClientProxy>? onInstanceCreated;
36+
3237
/// <summary>
3338
/// The list of chats we attempted to join with the bot.
3439
/// </summary>
@@ -67,11 +72,6 @@ public class TwitchClientProxy : ITwitchClientProxy {
6772
/// The callback(s) to invoke when a channel receives a ban message.
6873
/// </summary>
6974
private Action<OnUserBannedArgs>? onUserBanReceived;
70-
71-
/// <summary>
72-
/// The callback(s) to invoke when a new instance is created.
73-
/// </summary>
74-
private static Action<TwitchClientProxy>? onInstanceCreated;
7575

7676
/// <summary>
7777
/// The web socket to connect to twitch chat with.
@@ -170,17 +170,6 @@ public async Task AddMessageCallback(string channel, Action<OnMessageReceivedArg
170170
public void RemoveMessageCallback(Action<OnMessageReceivedArgs> callback) {
171171
onMessageReceived -= callback;
172172
}
173-
174-
/// <inheritdoc />
175-
public void AddInstanceCallback(Action<TwitchClientProxy> callback) {
176-
onInstanceCreated -= callback;
177-
onInstanceCreated += callback;
178-
}
179-
180-
/// <inheritdoc />
181-
public void RemoveInstanceCallback(Action<TwitchClientProxy> callback) {
182-
onInstanceCreated -= callback;
183-
}
184173

185174
/// <inheritdoc />
186175
public async Task AddBannedCallback(string channel, Action<OnUserBannedArgs> callback) {
@@ -214,6 +203,17 @@ public ValueTask DisposeAsync() {
214203
return ValueTask.CompletedTask;
215204
}
216205

206+
/// <inheritdoc />
207+
public void AddInstanceCallback(Action<TwitchClientProxy> callback) {
208+
onInstanceCreated -= callback;
209+
onInstanceCreated += callback;
210+
}
211+
212+
/// <inheritdoc />
213+
public void RemoveInstanceCallback(Action<TwitchClientProxy> callback) {
214+
onInstanceCreated -= callback;
215+
}
216+
217217
/// <summary>
218218
/// Joins a twitch channel.
219219
/// </summary>
@@ -429,7 +429,7 @@ protected virtual void Dispose(bool disposing) {
429429
twitchChatClientReconnect?.Dispose();
430430
socket?.Dispose();
431431
}
432-
432+
433433
instance = null;
434434
}
435435
}

0 commit comments

Comments
 (0)