using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using RPG.Services.Core.Extensions; using RPG.Services.Gateserver.Network.Command; using RPG.Services.Gateserver.Network.Tcp; using RPG.Services.Gateserver.Options; namespace RPG.Services.Gateserver; internal static class Program { private const string GatewayOptionsSectionName = "Gateway"; private static async Task Main(string[] args) { Console.Title = "KafkaSR | Gateserver"; HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); builder.SetupRPGService(); IConfigurationSection gatewaySection = builder.Configuration.GetRequiredSection(GatewayOptionsSectionName); builder.Services.Configure(gatewaySection) .AddSingleton(); await builder.Build().RunAsync(); } }