Fixed some of the compiler warnings.

This commit is contained in:
Tom
2024-12-28 21:19:28 +00:00
parent db1d57c218
commit 4f5dd8f24e
20 changed files with 93 additions and 131 deletions

View File

@@ -167,7 +167,7 @@ namespace TwitchChatTTS.OBS.Socket
await Send(8, new RequestBatchMessage(uid, list));
}
public async Task Send(RequestMessage message, Action<Dictionary<string, object>>? callback = null)
public async Task Send(RequestMessage message, Action<Dictionary<string, object>?>? callback = null)
{
if (!Connected)
{
@@ -335,7 +335,7 @@ namespace TwitchChatTTS.OBS.Socket
}
var m = new RequestMessage("GetSceneItemId", string.Empty, new Dictionary<string, object>() { { "sceneName", sceneName }, { "sourceName", sceneItemName } });
await Send(m, async (d) =>
await Send(m, (d) =>
{
if (d == null || !d.TryGetValue("sceneItemId", out object? value) || value == null || !long.TryParse(value.ToString(), out long sceneItemId))
return;
@@ -357,7 +357,7 @@ namespace TwitchChatTTS.OBS.Socket
public RequestMessage Message { get; }
public string ParentId { get; }
public Dictionary<string, object>? ResponseValues { get; set; }
public Action<Dictionary<string, object>>? Callback { get; set; }
public Action<Dictionary<string, object>?>? Callback { get; set; }
public RequestData(RequestMessage message, string parentId)
{