2024-03-12 14:05:27 -04:00
|
|
|
using CommonSocketLibrary.Common;
|
|
|
|
using CommonSocketLibrary.Abstract;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2024-06-16 20:19:31 -04:00
|
|
|
using Serilog;
|
2024-03-12 14:05:27 -04:00
|
|
|
using TwitchChatTTS.Seven.Socket.Data;
|
|
|
|
using System.Text.Json;
|
|
|
|
|
|
|
|
namespace TwitchChatTTS.Seven.Socket
|
|
|
|
{
|
2024-06-16 20:19:31 -04:00
|
|
|
public class SevenSocketClient : WebSocketClient
|
|
|
|
{
|
2024-03-12 14:05:27 -04:00
|
|
|
public SevenHelloMessage? ConnectionDetails { get; set; }
|
|
|
|
|
|
|
|
public SevenSocketClient(
|
2024-06-16 20:19:31 -04:00
|
|
|
ILogger logger,
|
2024-03-12 14:05:27 -04:00
|
|
|
[FromKeyedServices("7tv")] HandlerManager<WebSocketClient, IWebSocketHandler> handlerManager,
|
|
|
|
[FromKeyedServices("7tv")] HandlerTypeManager<WebSocketClient, IWebSocketHandler> typeManager
|
2024-06-16 20:19:31 -04:00
|
|
|
) : base(logger, handlerManager, typeManager, new JsonSerializerOptions()
|
|
|
|
{
|
2024-03-12 14:05:27 -04:00
|
|
|
PropertyNameCaseInsensitive = false,
|
|
|
|
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower
|
2024-06-16 20:19:31 -04:00
|
|
|
})
|
|
|
|
{
|
2024-03-12 14:05:27 -04:00
|
|
|
ConnectionDetails = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|