revert: accidental delete
All checks were successful
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 30s
Build, Package and Push Images / sbom-scan (push) Successful in 40s
Build, Package and Push Images / container-build (push) Successful in 1m24s
Build, Package and Push Images / sonarqube (push) Successful in 1m26s
Build, Package and Push Images / container-sbom-scan (push) Successful in 33s

This commit is contained in:
Timothy Schenk 2023-11-25 12:26:28 +01:00
parent 3efe3a5aac
commit e72f939319

View file

@ -2,6 +2,7 @@
using System.Net;
using System.Reflection;
using System.Text.Json;
using MassTransit;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
@ -16,6 +17,7 @@ using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
using Server.DB;
using Server.Services;
using Wonderking.Game.Mapping;
var builder = Host.CreateApplicationBuilder();
#if DEBUG
@ -94,6 +96,10 @@ builder.Services.AddDbContextPool<WonderkingContext>(o =>
.EnableSensitiveDataLogging().UseLazyLoadingProxies().UseLoggerFactory(loggerFactory);
});
builder.Services.AddSingleton<CharacterStatsMappingConfiguration>(
JsonSerializer.Deserialize<CharacterStatsMappingConfiguration>(
File.ReadAllText("config/character-stats.mapping.json")) ?? throw new InvalidOperationException());
builder.Services.AddSingleton<ILoggerFactory>(loggerFactory);
builder.Services.AddSingleton<PacketDistributorService>();
builder.Services.AddSingleton<ItemObjectPoolService>();