File tree Expand file tree Collapse file tree
Dotnet5.GraphQL3.CrossCutting/Extensions
Dotnet5.GraphQL3.Domain.Abstractions/Extensions/DependencyInjection
Dotnet5.GraphQL3.Repositories.Abstractions/Extensions/DependencyInjection Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- using Dotnet5 . GraphQL3 . CrossCutting . Extensions ;
1+ using Dotnet5 . GraphQL3 . CrossCutting ;
22using Dotnet5 . GraphQL3 . Domain . Abstractions . Builders ;
33using Microsoft . Extensions . DependencyInjection ;
44using Scrutor ;
@@ -8,12 +8,9 @@ namespace Dotnet5.GraphQL3.Domain.Abstractions.Extensions.DependencyInjection
88 public static class ServiceCollectionExtensions
99 {
1010 public static IServiceCollection AddBuilders ( this IServiceCollection services )
11- => services . Scan ( selector
12- => selector
13- . FromApplicationDependencies ( assembly
14- => assembly . FullName ? . StartsWith ( assembly . GetEntryAssemblySuffix ( ) ) ?? default )
15- . AddClasses ( filter
16- => filter . AssignableTo ( typeof ( IBuilder < , > ) ) )
11+ => services
12+ . Scan ( selector => selector . FromAssemblies ( Application . Assemblies )
13+ . AddClasses ( filter => filter . AssignableTo ( typeof ( IBuilder < , > ) ) )
1714 . UsingRegistrationStrategy ( RegistrationStrategy . Skip )
1815 . AsImplementedInterfaces ( )
1916 . WithScopedLifetime ( ) ) ;
Original file line number Diff line number Diff line change 1- using Dotnet5 . GraphQL3 . CrossCutting . Extensions ;
1+ using Dotnet5 . GraphQL3 . CrossCutting ;
22using Dotnet5 . GraphQL3 . Repositories . Abstractions . UnitsOfWork ;
33using Microsoft . Extensions . DependencyInjection ;
44using Scrutor ;
@@ -8,12 +8,9 @@ namespace Dotnet5.GraphQL3.Repositories.Abstractions.Extensions.DependencyInject
88 public static class ServiceCollectionExtensions
99 {
1010 public static IServiceCollection AddRepositories ( this IServiceCollection services )
11- => services . Scan ( selector
12- => selector
13- . FromApplicationDependencies ( assembly
14- => assembly . FullName ? . StartsWith ( assembly . GetEntryAssemblySuffix ( ) ) ?? default )
15- . AddClasses ( filter
16- => filter . AssignableTo ( typeof ( IRepository < , > ) ) )
11+ => services
12+ . Scan ( selector => selector . FromAssemblies ( Application . Assemblies )
13+ . AddClasses ( filter => filter . AssignableTo ( typeof ( IRepository < , > ) ) )
1714 . UsingRegistrationStrategy ( RegistrationStrategy . Skip )
1815 . AsImplementedInterfaces ( )
1916 . WithScopedLifetime ( ) ) ;
You can’t perform that action at this time.
0 commit comments