initial commit

This commit is contained in:
tk
2024-11-13 18:18:28 +08:00
commit 013f35e296
1500 changed files with 443723 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Extensions.DependencyInjection;
namespace FreeSql.Provider.QuestDb
{
internal class QuestDbContainer
{
//作用于HttpClientFatory
private static IServiceCollection Services;
internal static IServiceProvider ServiceProvider { get; private set; }
internal static void Initialize(Action<IServiceCollection> service)
{
Services = new ServiceCollection();
service?.Invoke(Services);
ServiceProvider = Services.BuildServiceProvider();
}
internal static T GetService<T>()
{
return ServiceProvider.GetService<T>();
}
}
}