Skip to content

Commit

Permalink
remove ForType<> function deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
quyvu01 committed Jan 13, 2025
1 parent ec221bc commit fa686e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/OfX.Tests/OfXStronglyTypeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public OfXStronglyTypeTests()
{
options.AddAttributesContainNamespaces(assembly);
options.AddHandlersFromNamespaceContaining<ITestAssemblyMarker>();
options.AddStronglyTypeIdConverter(c => c.ForType<StronglyTypeTestsRegister>());
options.AddStronglyTypeIdConverter(c => c.OfType<StronglyTypeTestsRegister>());
}))
.InstallAllServices();
}
Expand Down
6 changes: 0 additions & 6 deletions src/OfX/ApplicationModels/StronglyTypeIdRegister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ public sealed class StronglyTypeIdRegister
{
public List<Type> 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<T>() where T : IStronglyTypeConverter
{
StronglyTypeConfigurations.Add(typeof(T));
return this;
}
public StronglyTypeIdRegister OfType<T>() where T : IStronglyTypeConverter
{
StronglyTypeConfigurations.Add(typeof(T));
Expand Down

0 comments on commit fa686e6

Please sign in to comment.