chore: Sonar Warnings
This commit is contained in:
parent
2da3bc98cd
commit
821e3accb8
2 changed files with 2 additions and 5 deletions
|
@ -14,7 +14,7 @@ using BenchmarkDotNet.Order;
|
|||
[ThreadingDiagnoser]
|
||||
public class BinaryConversionBenchmarks
|
||||
{
|
||||
private byte[] _data;
|
||||
private byte[] _data = null!;
|
||||
private int _offset;
|
||||
|
||||
[GlobalSetup]
|
||||
|
|
|
@ -29,13 +29,10 @@ public class PacketDistributorService : IHostedService
|
|||
private readonly ILogger<PacketDistributorService> _logger;
|
||||
private readonly ConcurrentDictionary<OperationCode, object> _packetHandlersInstantiation;
|
||||
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
|
||||
public PacketDistributorService(ILogger<PacketDistributorService> logger, IServiceProvider serviceProvider)
|
||||
{
|
||||
this._concurrentQueue = new ConcurrentQueue<RawPacket>();
|
||||
this._logger = logger;
|
||||
this._serviceProvider = serviceProvider;
|
||||
var tempDeserializationMap =
|
||||
new Dictionary<OperationCode, Func<byte[], IPacket>>();
|
||||
|
||||
|
@ -46,7 +43,7 @@ public class PacketDistributorService : IHostedService
|
|||
packetHandlers.ForEach(x =>
|
||||
{
|
||||
var packetHandler =
|
||||
ActivatorUtilities.GetServiceOrCreateInstance(this._serviceProvider,
|
||||
ActivatorUtilities.GetServiceOrCreateInstance(serviceProvider,
|
||||
x.Value);
|
||||
this._packetHandlersInstantiation.TryAdd(x.Key, packetHandler);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue