Aura.Login.LoginServer.LoadWebApi C# (CSharp) Метод

LoadWebApi() приватный Метод

Starts web server for API
private LoadWebApi ( ) : void
Результат void
		private void LoadWebApi()
		{
			Log.Info("Loading Web API...");

			// Trick compiler into referencing Mabi.dll, so Swebs references
			// it in the C# scripts as well.
			var x = Mabi.Const.GuildMemberRank.Applied;

			var conf = new Configuration();
			conf.Port = this.Conf.Login.WebPort;
			conf.SourcePaths.Add("user/api/");
			conf.SourcePaths.Add("system/api/");

			this.HttpServer = new HttpServer(conf);
			this.HttpServer.UnhandledException += (s, e) => Log.Exception(e.Exception);

			try
			{
				this.HttpServer.Start();

				Log.Info("Web API listening on 0.0.0.0:{0}.", this.Conf.Login.WebPort);
			}
			catch (NHttpException)
			{
				Log.Error("Failed to start web server.");
				Log.Info("Port {0} might already be in use, make sure no other application, like other web servers or Skype, are using it or set a different port in web.conf.", this.Conf.Login.WebPort);
				CliUtil.Exit(1);
			}
		}