Snowflake/RPG.Services.Gameserver/Program.cs

27 lines
803 B
C#
Raw Normal View History

2024-01-19 14:45:18 +00:00
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using RPG.GameCore.Excel;
2024-01-18 22:13:40 +00:00
using RPG.Services.Core.Extensions;
2024-01-19 14:45:18 +00:00
using RPG.Services.Gameserver.Extensions;
using RPG.Services.Gameserver.Modules;
2024-01-18 22:13:40 +00:00
using RPG.Services.Gameserver.Network.Command;
2024-01-18 16:18:25 +00:00
2024-01-18 22:13:40 +00:00
namespace RPG.Services.Gameserver;
internal static class Program
2024-01-18 16:18:25 +00:00
{
2024-01-18 22:13:40 +00:00
private static async Task Main(string[] args)
2024-01-18 16:18:25 +00:00
{
2024-01-18 22:13:40 +00:00
Console.Title = "Snowflake | Gameserver";
HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
builder.SetupRPGService<RPGGameserver, GameserverCommandHandler>();
2024-01-19 14:45:18 +00:00
builder.Services.AddModules()
.AddScoped<ModuleManager>()
.AddSingleton<ExcelTables>();
2024-01-18 22:13:40 +00:00
await builder.Build().RunAsync();
2024-01-18 16:18:25 +00:00
}
}