Exemplo n.º 1
0
        public Adapter(ISettings settings, IServiceFacade udapiServiceFacade, IAdapterPlugin platformConnector, IStreamListenerManager listenersManager)
        {
            _listenersManager = listenersManager;

            Settings          = settings;
            UDAPIService      = udapiServiceFacade;
            PlatformConnector = platformConnector;

            var statemanager = new StateManager(settings, platformConnector);

            StateManager = statemanager;
            StateProviderProxy.Init(statemanager);

            listenersManager.StateManager = statemanager;

            if (settings.StatsEnabled)
            {
                StatsManager.Configure();
            }

            // we just need the initialisation
            new SuspensionManager(statemanager, PlatformConnector);

            platformConnector.Initialise();
            statemanager.AddRules(platformConnector.MarketRules);


            ThreadPool.SetMinThreads(500, 500);

            _sports = new List <string>();

            _stats = StatsManager.Instance["adapter.core"].GetHandle();

            PopuplateAdapterVersionInfo();
        }
Exemplo n.º 2
0
        public Adapter(ISettings settings, IServiceFacade udapiServiceFacade, IAdapterPlugin platformConnector, IStreamListenerManager listenersManager)
        {
            _listenersManager = listenersManager;
            
            Settings = settings;
            UDAPIService = udapiServiceFacade;
            PlatformConnector = platformConnector;

            var statemanager = new StateManager(settings,platformConnector);
            StateManager = statemanager;
            StateProviderProxy.Init(statemanager);

            listenersManager.StateManager = statemanager;

            if (settings.StatsEnabled)
                StatsManager.Configure();

            // we just need the initialisation
            new SuspensionManager(statemanager, PlatformConnector);

            platformConnector.Initialise();
            statemanager.AddRules(platformConnector.MarketRules);


            ThreadPool.SetMinThreads(500, 500);
            
            _sports = new List<string>();
            
            _stats = StatsManager.Instance["adapter.core"].GetHandle();

            PopuplateAdapterVersionInfo();
        }
Exemplo n.º 3
0
        public Adapter(
            ISettings settings,
            IServiceFacade udapiServiceFacade,
            IAdapterPlugin platformConnector,
            IStateManager stateManager,
            IStateProvider stateProvider,
            ISuspensionManager suspensionManager,
            IStreamHealthCheckValidation streamHealthCheckValidation,
            IFixtureValidation fixtureValidation)
        {
            _settings                    = settings ?? throw new ArgumentNullException(nameof(settings));
            _udapiServiceFacade          = udapiServiceFacade ?? throw new ArgumentNullException(nameof(udapiServiceFacade));
            _platformConnector           = platformConnector ?? throw new ArgumentNullException(nameof(platformConnector));
            _stateManager                = stateManager ?? throw new ArgumentNullException(nameof(stateManager));
            _suspensionManager           = suspensionManager ?? throw new ArgumentNullException(nameof(suspensionManager));
            _streamHealthCheckValidation = streamHealthCheckValidation ?? throw new ArgumentNullException(nameof(streamHealthCheckValidation));
            _fixtureValidation           = fixtureValidation ?? throw new ArgumentNullException(nameof(fixtureValidation));

            StateProviderProxy.Init(stateProvider);

            if (settings.StatsEnabled)
            {
                StatsManager.Configure();
            }

            platformConnector.Initialise();
            stateManager.AddRules(platformConnector.MarketRules);

            ThreadPool.SetMinThreads(500, 500);

            _stats = StatsManager.Instance["adapter.core"].GetHandle();

            PopuplateAdapterVersionInfo();
        }