コード例 #1
0
ファイル: CQGCAdapter.cs プロジェクト: ralex1975/Polygon
        /// <summary>
        ///     Конструктор
        /// </summary>
        /// <param name="settings">
        ///     Настройки
        /// </param>
        /// <param name="telemetry">
        ///     Служба телеметрии
        /// </param>
        /// <param name="transportFactory">
        ///     Фабрика транспорта
        /// </param>
        public CQGCAdapter(CQGCParameters settings)
        {
            this.settings = settings;

            MarketDataResolved    += OnMarketDataResolved;
            MarketDataNotResolved += OnMarketDataNotResolved;
        }
コード例 #2
0
ファイル: CQGCConnector.cs プロジェクト: ralex1975/Polygon
        /// <summary>
        ///     Конструктор
        /// </summary>
        public CQGCConnector(
            CQGCParameters settings)
        {
            this.settings = settings;
            adapter       = new CQGCAdapter(settings);
            var instrumentResolver = new CQGCInstrumentResolver(adapter, settings.InstrumentConverter);

            feed                      = new CQGCFeed(adapter, instrumentResolver);
            router                    = new CQGCRouter(adapter, instrumentResolver);
            historyProvider           = new CQGCInstrumentHistoryProvider(adapter, instrumentResolver);
            ConnectionStatusProviders = new IConnectionStatusProvider[] { this };

            adapter.ConnectionStatusChanged += AdapterConnectionStatusChanged;
            adapter.UserMessageReceived     += UserMessageReceived;
        }