Skip to content

Commit 8b08c43

Browse files
authored
Fix bug about ProjectSearchProvider not getting registered (#2786)
1 parent 95b2eaa commit 8b08c43

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/JoinRpg.Services.Impl/Services.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Reflection;
12
using JoinRpg.Services.Impl.Search;
23

34
namespace JoinRpg.Services.Impl;
@@ -22,12 +23,10 @@ public static IEnumerable<Type> GetTypes()
2223
yield return typeof(GameSubscribeService);
2324
yield return typeof(RespMasterRuleService);
2425

25-
yield return typeof(CharacterGroupsProvider);
26-
yield return typeof(CharacterProvider);
27-
yield return typeof(ClaimsByIdProvider);
28-
yield return typeof(PlotSearchProvider);
29-
yield return typeof(PlotSearchProvider);
30-
yield return typeof(UserSearchProvider);
26+
foreach (var provider in Assembly.GetExecutingAssembly().DefinedTypes.Where(t => t.IsAssignableTo(typeof(ISearchProvider))).Select(t => t.AsType()))
27+
{
28+
yield return provider;
29+
}
3130

3231
yield return typeof(SlotMassConvertService);
3332
}

0 commit comments

Comments
 (0)