This commit is contained in:
lihanbo 2024-10-16 11:24:29 +08:00
parent 19a612160e
commit 7a6c1d8481
1 changed files with 2 additions and 2 deletions

View File

@ -7,9 +7,9 @@ namespace LFlow.Base;
public class App public class App
{ {
public static IServiceCollection? services; public static IServiceCollection? services;
private static IServiceProvider? serviceProvider => services?.BuildServiceProvider(); private static IServiceProvider? ServiceProvider => services?.BuildServiceProvider();
public static T? GetService<T>() public static T? GetService<T>()
{ {
return serviceProvider.GetService<T>(); return ServiceProvider!.GetService<T>();
} }
} }