From fa686e6da6ca38ceba3d8700558e905a337a52d3 Mon Sep 17 00:00:00 2001 From: quyvu Date: Mon, 13 Jan 2025 10:21:26 +0700 Subject: [PATCH] remove ForType<> function deprecated --- src/OfX.Tests/OfXStronglyTypeTests.cs | 2 +- src/OfX/ApplicationModels/StronglyTypeIdRegister.cs | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/OfX.Tests/OfXStronglyTypeTests.cs b/src/OfX.Tests/OfXStronglyTypeTests.cs index a0d7e83..ec7b60c 100644 --- a/src/OfX.Tests/OfXStronglyTypeTests.cs +++ b/src/OfX.Tests/OfXStronglyTypeTests.cs @@ -20,7 +20,7 @@ public OfXStronglyTypeTests() { options.AddAttributesContainNamespaces(assembly); options.AddHandlersFromNamespaceContaining(); - options.AddStronglyTypeIdConverter(c => c.ForType()); + options.AddStronglyTypeIdConverter(c => c.OfType()); })) .InstallAllServices(); } diff --git a/src/OfX/ApplicationModels/StronglyTypeIdRegister.cs b/src/OfX/ApplicationModels/StronglyTypeIdRegister.cs index a843deb..7650cdd 100644 --- a/src/OfX/ApplicationModels/StronglyTypeIdRegister.cs +++ b/src/OfX/ApplicationModels/StronglyTypeIdRegister.cs @@ -6,12 +6,6 @@ public sealed class StronglyTypeIdRegister { public List StronglyTypeConfigurations { get; } = []; - [Obsolete("This method ForType<> should be remove in the next version. Please use OfType<> to be family with OfX eco system!")] - public StronglyTypeIdRegister ForType() where T : IStronglyTypeConverter - { - StronglyTypeConfigurations.Add(typeof(T)); - return this; - } public StronglyTypeIdRegister OfType() where T : IStronglyTypeConverter { StronglyTypeConfigurations.Add(typeof(T));