Browse Source

Merge branch 'dev' into cmskit-widget-render

pull/13082/head
malik masis 4 years ago
parent
commit
158b8c4bf7
  1. 6
      framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs

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

Loading…
Cancel
Save