mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	-增加HttpClientFatory
This commit is contained in:
		
							
								
								
									
										25
									
								
								Providers/FreeSql.Provider.QuestDb/QuestDbContainer.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Providers/FreeSql.Provider.QuestDb/QuestDbContainer.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using Microsoft.Extensions.DependencyInjection;
 | 
			
		||||
 | 
			
		||||
namespace FreeSql.Provider.QuestDb
 | 
			
		||||
{
 | 
			
		||||
    internal class QuestDbContainer
 | 
			
		||||
    {
 | 
			
		||||
        private static IServiceCollection Services;
 | 
			
		||||
        public 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>();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user