using Hangfire;
using Microsoft.Extensions.DependencyInjection;
using OnlineSalesAutoCrop.CoreAPI.Services.Contracts.Auth;
using OnlineSalesAutoCrop.CoreAPI.Services.Contracts.BackgroupJobs;
using OnlineSalesAutoCrop.CoreAPI.Services.Contracts.Integrations;
using OnlineSalesAutoCrop.CoreAPI.Services.Contracts.MobileApp;
using OnlineSalesAutoCrop.CoreAPI.Services.Contracts.Setups;
using OnlineSalesAutoCrop.CoreAPI.Services.Contracts.Systems;
using OnlineSalesAutoCrop.CoreAPI.Services.Services.Auth;
using OnlineSalesAutoCrop.CoreAPI.Services.Services.BackgroupJobs;
using OnlineSalesAutoCrop.CoreAPI.Services.Services.Integrations;
using OnlineSalesAutoCrop.CoreAPI.Services.Services.MobileApp;
using OnlineSalesAutoCrop.CoreAPI.Services.Services.Setups;
using OnlineSalesAutoCrop.CoreAPI.Services.Services.Systems;

namespace OnlineSalesAutoCrop.CoreAPI.Configuration.DI
{
	/// <summary>
	/// 
	/// </summary>
	public static class ServiceCollectionExtensions
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="services"></param>
		public static void ConfigureBusinessServices(this IServiceCollection services)
		{
			if (services == null)
				return;
            services.AddSingleton<IEaseCache, EaseCache>();		
			services.AddTransient<IUserService, UserService>();		
			services.AddTransient<IParamTypeService, ParamTypeService>();
			services.AddTransient<IThisSystemService, ThisSystemService>();
			services.AddTransient<IAuthModulesService, AuthModulesService>();
			services.AddTransient<IRefreshTokenService, RefreshTokenService>();
			services.AddScoped<IIntegrationService, IntegrationService>();	
			services.AddScoped<IMobileMasterDataService, MobileMasterDataService>();
            services.AddScoped<IBackgroundJobService, BackgroundJobService>();
            services.AddScoped<IOrderService, OrderService>();         
		}
	}
}
