Skip to content

Commit

Permalink
CODERUB: Rename GetService method
Browse files Browse the repository at this point in the history
  • Loading branch information
LBoullosa committed Oct 5, 2024
1 parent 52063d9 commit e58ee38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ internal partial class DependencyInjectionBroker
public IServiceProvider BuildServiceProvider(IServiceCollection serviceCollection) =>
serviceCollection.BuildServiceProvider();

public T ResolveImplementation<T>(IServiceProvider serviceProvider) =>
public T GetService<T>(IServiceProvider serviceProvider) =>
serviceProvider.GetRequiredService<T>();

public T ResolveImplementation<T>(IServiceProvider serviceProvider, string spalId) =>
public T GetService<T>(IServiceProvider serviceProvider, string spalId) =>
serviceProvider.GetRequiredKeyedService<T>(spalId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace STX.SPAL.Core.Brokers.DependenciesInjections
internal partial interface IDependencyInjectionBroker
{
IServiceProvider BuildServiceProvider(IServiceCollection serviceCollection);
T ResolveImplementation<T>(IServiceProvider serviceProvider);
T ResolveImplementation<T>(IServiceProvider serviceProvider, string spalId);
T GetService<T>(IServiceProvider serviceProvider);
T GetService<T>(IServiceProvider serviceProvider, string spalId);
}
}

0 comments on commit e58ee38

Please sign in to comment.