net8, language features, bugfixes
This commit is contained in:
parent
1591618c2c
commit
ce99053a10
353 changed files with 3245 additions and 3944 deletions
|
|
@ -7,18 +7,11 @@ using Vaitr.Network;
|
|||
|
||||
namespace Insight.Server.Network.Remote.Handlers;
|
||||
|
||||
public class RemoteHandler : IMessageHandler<RemoteSession>
|
||||
public class RemoteHandler(Bus bus, ISessionPool<RemoteSession, IMessage> remotePool, ILogger<RemoteHandler> logger) : IMessageHandler<RemoteSession>
|
||||
{
|
||||
private readonly Bus _bus;
|
||||
private readonly ISessionPool<RemoteSession, IMessage> _remotePool;
|
||||
private readonly ILogger<RemoteHandler> _logger;
|
||||
|
||||
public RemoteHandler(Bus bus, ISessionPool<RemoteSession, IMessage> remotePool, ILogger<RemoteHandler> logger)
|
||||
{
|
||||
_bus = bus;
|
||||
_remotePool = remotePool;
|
||||
_logger = logger;
|
||||
}
|
||||
private readonly Bus _bus = bus;
|
||||
private readonly ISessionPool<RemoteSession, IMessage> _remotePool = remotePool;
|
||||
private readonly ILogger<RemoteHandler> _logger = logger;
|
||||
|
||||
public async ValueTask HandleAsync<TMessage>(RemoteSession sender, TMessage message, CancellationToken cancellationToken) where TMessage : IMessage
|
||||
{
|
||||
|
|
@ -54,7 +47,7 @@ public class RemoteHandler : IMessageHandler<RemoteSession>
|
|||
|
||||
private async Task OnSessionRequest(RemoteSession session, RemoteSessionRequest sessionRequest, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation($"Remote {session.Id} => SessionRequest");
|
||||
_logger.LogInformation("Remote {session} => SessionRequest", session.Id);
|
||||
|
||||
session.Mode = sessionRequest.Mode;
|
||||
|
||||
|
|
@ -97,14 +90,14 @@ public class RemoteHandler : IMessageHandler<RemoteSession>
|
|||
|
||||
private async Task OnClipboardData(RemoteSession session, CastClipboardReceived clipboardChanged, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation($"Remote {session.Id} => ClipboardData");
|
||||
_logger.LogInformation("Remote {session} => ClipboardData", session.Id);
|
||||
|
||||
await _bus.PublishAsync(clipboardChanged, cancellationToken);
|
||||
}
|
||||
|
||||
private async Task OnAudioData(RemoteSession session, CastAudio audioSample, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation($"Remote {session.Id} => AudioData");
|
||||
_logger.LogInformation("Remote {session} => AudioData", session.Id);
|
||||
|
||||
await _bus.PublishAsync(audioSample, cancellationToken);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue