ci: adjust buildscript
Some checks failed
Test if Server can be built / build-server (push) Failing after 22s
Some checks failed
Test if Server can be built / build-server (push) Failing after 22s
This commit is contained in:
parent
ca8960b980
commit
3f22556a2e
2 changed files with 6 additions and 8 deletions
|
@ -95,10 +95,9 @@ public class PacketDistributorService : IHostedService
|
|||
var packetHandlersWithId = assembly.GetTypes().AsParallel().Where(t =>
|
||||
t is { IsClass: true, IsAbstract: false } && t
|
||||
.GetInterfaces().Any(i =>
|
||||
i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IPacketHandler<>))).ToDictionary(type =>
|
||||
type.GetInterfaces().First(t =>
|
||||
t is { IsGenericType: true } && t.GetGenericTypeDefinition() == typeof(IPacketHandler<>))
|
||||
.GetGenericArguments().First().GetCustomAttribute<PacketIdAttribute>().Code);
|
||||
i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IPacketHandler<>))).ToDictionary(type => type.GetInterfaces().First(t =>
|
||||
t is { IsGenericType: true } && t.GetGenericTypeDefinition() == typeof(IPacketHandler<>))
|
||||
.GetGenericArguments().First().GetCustomAttribute<PacketIdAttribute>().Code);
|
||||
|
||||
if (packetHandlersWithId is not { Count: 0 })
|
||||
{
|
||||
|
@ -129,13 +128,13 @@ public class PacketDistributorService : IHostedService
|
|||
private void InvokePacketHandler(RawPacket item)
|
||||
{
|
||||
this.logger.PacketDequeued(item.Session.Id, item.OperationCode);
|
||||
if (!this.deserializationMap.ContainsKey(item.OperationCode))
|
||||
if (!this.deserializationMap.TryGetValue(item.OperationCode, out var value))
|
||||
{
|
||||
this.logger.PacketTypeNotFound(item.OperationCode);
|
||||
return;
|
||||
}
|
||||
|
||||
var packet = this.deserializationMap[item.OperationCode](item.MessageBody);
|
||||
var packet = value(item.MessageBody);
|
||||
this.logger.PacketData(JsonConvert.SerializeObject(packet));
|
||||
this.packetHandlersInstantiation[item.OperationCode].GetType().GetMethod(nameof(IPacketHandler<IPacket>.HandleAsync))
|
||||
?.Invoke(this.packetHandlersInstantiation[item.OperationCode], new object[] { packet, item.Session });
|
||||
|
|
|
@ -87,10 +87,9 @@ sealed class Build : NukeBuild
|
|||
.SetLogin(SonarToken)
|
||||
.SetServer(SonarHostUrl);
|
||||
var sonarScannerEndSettings = new SonarScannerEndSettings()
|
||||
.SetProjectKey("wonderking_continuity_AYeecUUTs-PH__JrTRky")
|
||||
.SetLogin(SonarToken)
|
||||
.SetServer(SonarHostUrl);
|
||||
var scannerBegin = SonarScannerTasks.SonarScannerBegin(sonarScannerSettings);
|
||||
SonarScannerTasks.SonarScannerBegin(sonarScannerSettings);
|
||||
DotNetTasks.DotNetBuild(settings => settings.SetNoRestore(true));
|
||||
SonarScannerTasks.SonarScannerEnd(sonarScannerEndSettings);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue