FastQuant.StrategyManager.RegisterMarketDataRequest C# (CSharp) Méthode

RegisterMarketDataRequest() public méthode

public RegisterMarketDataRequest ( IDataProvider dataProvider, InstrumentList instrumentList ) : void
dataProvider IDataProvider
instrumentList InstrumentList
Résultat void
        public void RegisterMarketDataRequest(IDataProvider dataProvider, InstrumentList instrumentList)
        {
            InstrumentList alreadyRegistered = null;
            if (!this.subscriptions.TryGetValue(dataProvider, out alreadyRegistered))
            {
                alreadyRegistered = new InstrumentList();
                this.subscriptions[dataProvider] = alreadyRegistered;
            }

            foreach (var current in instrumentList)
                if (!alreadyRegistered.Contains(current.Id))
                    alreadyRegistered.Add(current);

            if (Status == StrategyStatus.Running)
                this.framework.SubscriptionManager?.Subscribe(dataProvider, instrumentList);
        }