From bf75d2f25fdf086675067f2400cb395a848f4468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 14 Jun 2022 14:54:43 +0300 Subject: [PATCH] #12998 Add method: IServiceCollection.GetTypeFinder() --- .../ServiceCollectionCommonExtensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs index 37275108bc..9cf4200788 100644 --- a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs +++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Reflection; using JetBrains.Annotations; using Volo.Abp; +using Volo.Abp.Reflection; namespace Microsoft.Extensions.DependencyInjection; @@ -18,6 +19,11 @@ public static class ServiceCollectionCommonExtensions return services.Any(d => d.ServiceType == type); } + public static ITypeFinder GetTypeFinder(this IServiceCollection services) + { + return services.GetSingletonInstance(); + } + public static T GetSingletonInstanceOrNull(this IServiceCollection services) { return (T)services