This commit is contained in:
TheXamlGuy
2024-06-15 11:09:15 +01:00
parent b155f5c6e2
commit 370e6bf96b
9 changed files with 22 additions and 96 deletions
@@ -1,17 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
namespace Toolkit.Foundation;
public static class IServiceProviderExtensions
{
public static object GetRequiredKeyedService(this IServiceProvider provider,
Type serviceType,
Action<object> serviceDelegate,
object? serviceKey)
{
object service = provider.GetRequiredKeyedService(serviceType, serviceKey);
serviceDelegate.Invoke(service);
return service;
}
}