|
|
|
@ -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<ITypeFinder>(); |
|
|
|
} |
|
|
|
|
|
|
|
public static T GetSingletonInstanceOrNull<T>(this IServiceCollection services) |
|
|
|
{ |
|
|
|
return (T)services |
|
|
|
|