Skip to content

Commit

Permalink
FIX test?
Browse files Browse the repository at this point in the history
  • Loading branch information
MeikelLP committed Sep 19, 2024
1 parent 1fced46 commit bd67e46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Core/Extensions/ServiceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public static IServiceCollection AddCoreServices(this IServiceCollection service
services.AddCustomLogging(configuration);
services.AddSingleton<IPacketManager>(provider =>
{
var packetTypes = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.ExportedTypes)
var packetTypes = AppDomain.CurrentDomain.GetAssemblies()
.Where(x => !x.IsDynamic) // ignore Castle.Core proxies
.SelectMany(x => x.GetExportedTypes())
.Where(x => x.IsAssignableTo(typeof(IPacketSerializable)) &&
x.GetCustomAttribute<PacketAttribute>()?.Direction.HasFlag(EDirection.Incoming) == true)
.OrderBy(x => x.FullName)
Expand Down Expand Up @@ -66,7 +68,7 @@ private static IServiceCollection AddCustomLogging(this IServiceCollection servi

// add minimum log level for the instances
config.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft.EntityFrameworkCore.Query", LogEventLevel.Warning);
.MinimumLevel.Override("Microsoft.EntityFrameworkCore.Database.Command", LogEventLevel.Warning);

// add destructuring for entities
config.Destructure.ToMaximumDepth(4)
Expand Down

0 comments on commit bd67e46

Please sign in to comment.