continuity/Server/Consumers/PacketConsumer.cs
Timothy Schenk 1455bdd75a
All checks were successful
Test if Server can be built / build-server (push) Successful in 22s
chore: apply dotnet format
2023-10-12 09:15:34 +02:00

18 lines
489 B
C#

namespace Server.Consumers;
using MassTransit;
using Packets;
using Services;
public class PacketConsumer : IConsumer<RawPacket>
{
private readonly PacketDistributorService distributorService;
public PacketConsumer(PacketDistributorService distributorService) => this.distributorService = distributorService;
public Task Consume(ConsumeContext<RawPacket> context)
{
this.distributorService.AddPacket(context.Message);
return Task.CompletedTask;
}
}