23 lines
714 B
C#
Raw Permalink Normal View History

2025-03-16 03:17:36 +08:00
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Seyounth.Hyosung.Core;
using Seyounth.Hyosung.Data;
namespace Seyounth.Hyosung.Runtime;
public static class ServiceExtensions
{
public static IServiceCollection AddHyosung(this IServiceCollection services, ConfigurationManager configuration)
{
services.AddHyosungData(configuration);
services.AddHyosungServices(configuration);
services.AddHostedService<HyosungWorker>();
services.AddSingleton<IHyosungRuntime, HyosungRuntime>();
return services;
}
public static void UseHyosung(this IServiceProvider provider)
{
provider.UseHyosungData();
}
}