Esempio n. 1
0
        public Program(string[] args)
        {
            var configurationProvider = args.Length > 0 ? GetConfigurationProvider(args[0]) : null;

            server = new MtaServer(
                Directory.GetCurrentDirectory(),
                @"net.dll",
                configurationProvider?.GetConfiguration(),
                Configure
                )
            {
                GameType = "Slipe Server",
                MapName  = "N/A"
            };

            System.Console.CancelKeyPress += delegate
            {
                server.Stop();
                waitHandle.Set();
            };

            SetupQueueHandlers();
            SetupBehaviour();
            SetupLogic();

            server.Start();

            waitHandle.WaitOne();
        }
Esempio n. 2
0
 public ServerTestLogic(Server.MtaServer server, IElementRepository elementRepository, RootElement root, IResourceServer resourceServer)
 {
     this.server            = server;
     this.elementRepository = elementRepository;
     this.root           = root;
     this.resourceServer = resourceServer;
     this.SetupTestLogic();
 }
Esempio n. 3
0
        public Program()
        {
            server = new Server.MtaServer(@"C:\code\C# C++\MTA\mta-clean\Bin\server", @"net.dll", "0.0.0.0", 50666, new ElementRepository());

            SetupQueueHandlers();
            SetupTestLogic();

            Thread.Sleep(-1);
        }
Esempio n. 4
0
        public Program(string[] args)
        {
            var configurationProvider = args.Length > 0 ? GetConfigurationProvider(args[0]) : null;

            server = new Server.MtaServer(
                Directory.GetCurrentDirectory(),
                @"net.dll",
                configurationProvider?.GetConfiguration(),
                Configure
                );

            SetupQueueHandlers();
            SetupBehaviour();
            SetupLogic();

            server.Start();
            Thread.Sleep(-1);
        }