Skip to content

Commit

Permalink
fix: GetEntryAssembly
Browse files Browse the repository at this point in the history
  • Loading branch information
doddgu committed Sep 8, 2021
1 parent eeab0f2 commit ebb9df8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static class ServiceCollectionExtensions
public static IServiceCollection AddServices(this IServiceCollection services, string suffix, bool autoFire)
{
Assembly
.GetCallingAssembly()
.GetEntryAssembly()!
.GetTypes()
.Where(t => t.Name.EndsWith(suffix))
.ToList()
Expand All @@ -30,7 +30,7 @@ public static IServiceCollection AddServices<TService>(this IServiceCollection s
var serviceType = typeof(TService);

Assembly
.GetCallingAssembly()
.GetEntryAssembly()!
.GetTypes()
.Where(t => t.BaseType == serviceType)
.ToList()
Expand Down

0 comments on commit ebb9df8

Please sign in to comment.