KafkaSR/RPG.Services.Gameserver/Program.cs
2024-01-30 02:49:21 +03:00

26 lines
801 B
C#

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using RPG.GameCore.Excel;
using RPG.Services.Core.Extensions;
using RPG.Services.Gameserver.Extensions;
using RPG.Services.Gameserver.Modules;
using RPG.Services.Gameserver.Network.Command;
namespace RPG.Services.Gameserver;
internal static class Program
{
private static async Task Main(string[] args)
{
Console.Title = "KafkaSR | Gameserver";
HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
builder.SetupRPGService<RPGGameserver, GameserverCommandHandler>();
builder.Services.AddModules()
.AddScoped<ModuleManager>()
.AddSingleton<ExcelTables>();
await builder.Build().RunAsync();
}
}