Example #1
0
        public AseQueryService(MtaServer mtaServer, Configuration configuration, IElementRepository elementRepository)
        {
            this.mtaServer         = mtaServer;
            this.configuration     = configuration;
            this.elementRepository = elementRepository;

            this.aseVersion = AseVersion.v1_5;
            this.buildType  = BuildType.Release;

            this.rules = new Dictionary <string, string>();
        }
Example #2
0
        public AseBehaviour(IAseQueryService aseQueryService, Configuration configuration, ILogger logger)
        {
            this.aseQueryService = aseQueryService;
            this.logger          = logger;

            aseVersion = AseVersion.v1_5;

            lightCache = new Cache <byte[]>(() => aseQueryService.QueryLight(), cacheTime);
            xFireCache = new Cache <byte[]>(() => aseQueryService.QueryXFireLight(), cacheTime);
            fullCache  = new Cache <byte[]>(() => aseQueryService.QueryFull(), cacheTime);

            StartListening((ushort)(configuration.Port + 123));
        }