16 lines
340 B
C#
16 lines
340 B
C#
using System;
|
|
|
|
namespace LFlow.Base;
|
|
/// <summary>
|
|
/// 程序对象
|
|
/// </summary>
|
|
public class App
|
|
{
|
|
public static IServiceCollection? services;
|
|
private static IServiceProvider? ServiceProvider => services?.BuildServiceProvider();
|
|
public static T? GetService<T>()
|
|
{
|
|
return ServiceProvider!.GetService<T>();
|
|
}
|
|
}
|