LFlow/LFlow.Base/App.cs

18 lines
412 B
C#
Raw Normal View History

2024-10-31 10:38:21 +08:00
using System.Reflection;
2024-10-16 11:35:05 +08:00
namespace LFlow.Base;
/// <summary>
/// 程序对象
/// </summary>
public class App
{
2024-10-19 08:32:33 +08:00
internal static IServiceCollection? services;
2024-10-16 11:35:05 +08:00
private static IServiceProvider? ServiceProvider => services?.BuildServiceProvider();
public static T? GetService<T>()
{
return ServiceProvider!.GetService<T>();
}
2024-10-31 10:38:21 +08:00
public static List<Assembly> SubServiceAssembly = [];
2024-10-16 11:35:05 +08:00
}