From 63fccd75bffe9546c44b5702ff595524f0e833a6 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Thu, 2 Feb 2023 20:23:51 +0100 Subject: [PATCH] fix(core): make stateful repository return the correct type --- Core/NosSmooth.Core/NosSmooth.Core.csproj | 4 ++-- Core/NosSmooth.Core/Stateful/StatefulRepository.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/NosSmooth.Core/NosSmooth.Core.csproj b/Core/NosSmooth.Core/NosSmooth.Core.csproj index 96a65317477a945e88d6229bd1f5cafd23a994f4..b7b3633d9592306b27f4a3be71338b679c272e74 100644 --- a/Core/NosSmooth.Core/NosSmooth.Core.csproj +++ b/Core/NosSmooth.Core/NosSmooth.Core.csproj @@ -6,8 +6,8 @@ net7.0;netstandard2.1 Rutherther NosSmooth Core library allowing implementing nostale client, handling packets and commands. - 3.4.0 - Add possibility to add items to the stateful repository manually. + 3.4.1 + Fix StatefulInjector returning Func instead of the object. diff --git a/Core/NosSmooth.Core/Stateful/StatefulRepository.cs b/Core/NosSmooth.Core/Stateful/StatefulRepository.cs index f2480fec1e5693134f8e8fa989bb9c8112804fcf..d9bd32d8e559c597521a09d41cb85027bee6bd11 100644 --- a/Core/NosSmooth.Core/Stateful/StatefulRepository.cs +++ b/Core/NosSmooth.Core/Stateful/StatefulRepository.cs @@ -71,7 +71,7 @@ public class StatefulRepository { var objectDictionary = new ConcurrentDictionary(); objectDictionary.TryAdd - (statefulEntityType, () => ActivatorUtilities.CreateInstance(services, statefulEntityType)); + (statefulEntityType, ActivatorUtilities.CreateInstance(services, statefulEntityType)); return objectDictionary; }, (_, objectDictionary) =>