forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
44 lines (40 loc) · 1.41 KB
/
Program.cs
File metadata and controls
44 lines (40 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Diagnostics;
using System.Globalization;
using System.Threading;
using log4net;
using Ninject;
namespace L2dotNET.GameService
{
class Program
{
private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
private static void Main()
{
try {
Log.Info("Starting GameService...");
SetConsoleConfigurations();
SetNumberDecimalSeparator();
GameServer.Kernel = new StandardKernel(new DepInjectionModule());
GameServer server = GameServer.Kernel.Get<GameServer>();
server.Start();
Process.GetCurrentProcess().WaitForExit();
}
catch(Exception ex)
{
Console.WriteLine("EXCEPTION : " + ex.Message);
}
}
private static void SetConsoleConfigurations()
{
Console.Title = @"L2dotNET GameServer";
}
//TODO: Temporary fix. Need a better workaround to fix the Culture conversion issues. (Note: parsing error when reading "." in Latin cultures from XML files)
private static void SetNumberDecimalSeparator()
{
CultureInfo customCulture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
customCulture.NumberFormat.NumberDecimalSeparator = ".";
Thread.CurrentThread.CurrentCulture = customCulture;
}
}
}