public QuotationManager(
            QuotV5.Binary.RealTimeQuotConnection[] quotConnections,
            QuotationRepository quotRepository,
            QuotationMQPublisher quotPublisher,
            SecurityInfoProvider securityInfoProvider,
            IndexInfoProvider indexInfoProvider,
            CashAuctionParamsProvider cashAuctionParamsProvider,
            DerivativeAuctionParamsProvider derivativeAuctionParamsProvider,
            NegotiationParamsProvider negotiationParamsProvider,
            SecurityCloseMDProvider securityCloseMDProvider,
            Log4cb.ILog4cbHelper logHelper
            )
        {
            this.quotConnections = quotConnections;
            this.quotRepository = quotRepository;
            this.quotPublisher = quotPublisher;
            this.securityInfoProvider = securityInfoProvider;
            this.indexInfoProvider = indexInfoProvider;
            this.cashAuctionParamsProvider = cashAuctionParamsProvider;
            this.derivativeAuctionParamsProvider = derivativeAuctionParamsProvider;
            this.negotiationParamsProvider = negotiationParamsProvider;
            this.securityCloseMDProvider = securityCloseMDProvider;
            this.logHelper = logHelper;

            foreach (var conn in this.quotConnections)
                conn.OnMarketDataReceived += new Action<QuotV5.Binary.MarketDataEx>(QuotConn_OnMarketDataReceived);
            this.securityInfoProvider.OnStaticInfoRead += new Action<List<QuotV5.StaticInfo.SecurityInfoBase>>(SecurityInfoProvider_OnStaticInfoRead);
            this.indexInfoProvider.OnStaticInfoRead += new Action<List<QuotV5.StaticInfo.IndexInfo>>(IndexInfoProvider_OnStaticInfoRead);
            this.cashAuctionParamsProvider.OnStaticInfoRead += new Action<List<QuotV5.StaticInfo.CashAuctionParams>>(CashAuctionParamsProvider_OnStaticInfoRead);
            this.derivativeAuctionParamsProvider.OnStaticInfoRead += new Action<List<QuotV5.StaticInfo.DerivativeAuctionParams>>(DerivativeAuctionParamsProvider_OnStaticInfoRead);
            this.negotiationParamsProvider.OnStaticInfoRead += new Action<List<QuotV5.StaticInfo.NegotiationParams>>(NegotiationParamsProvider_OnStaticInfoRead);
            //this.securityCloseMDProvider.OnStaticInfoRead += new Action<List<QuotV5.StaticInfo.SecurityCloseMD>>(SecurityCloseMDProvider_OnStaticInfoRead);
        }
 public SocketProcessor(TcpClient tcpClient, Log4cb.ILog4cbHelper logHelper)
 {
     Contract.Requires(tcpClient != null);
     this._tcpClient = tcpClient;
     this._ip        = (tcpClient.Client.RemoteEndPoint as System.Net.IPEndPoint).Address.ToString();
     this._port      = (tcpClient.Client.RemoteEndPoint as System.Net.IPEndPoint).Port;
     this.logHelper  = logHelper;
 }
 public SocketProcessor(TcpClient tcpClient, Log4cb.ILog4cbHelper logHelper)
 {
     Contract.Requires(tcpClient != null);
     this._tcpClient = tcpClient;
     this._ip = (tcpClient.Client.RemoteEndPoint as System.Net.IPEndPoint).Address.ToString();
     this._port = (tcpClient.Client.RemoteEndPoint as System.Net.IPEndPoint).Port;
     this.logHelper = logHelper;
 }
 public QuotationSnapService(QuotationSnapServiceConfig config, QuotationMQPublisher quotPublisher, Log4cb.ILog4cbHelper logHelper)
 {
     this.config = config;
     this.quotPublisher = quotPublisher;
     this.logHelper = logHelper;
     MQConnConfig mqConfig = new MQConnConfig() { Address = config.Address };
     this.stockInfoMQConsumer = new MQConsumer(mqConfig, logHelper);
     this.quotInfoMQConsumer = new MQConsumer(mqConfig, logHelper);
 }
Exemple #5
0
 public QuotationMQPublisher(QuotationMQPublisherConfig config, Log4cb.ILog4cbHelper logHelper)
 {
     this.config     = config;
     this.logHelper  = logHelper;
     this.mqProducer = new MQProducer(new MQConnConfig()
     {
         Address = config.Address
     }, logHelper);
     this.StartProcessThread();
     this.mqProducer.StartMQ();
 }
Exemple #6
0
        public QuotationSnapService(QuotationSnapServiceConfig config, QuotationMQPublisher quotPublisher, Log4cb.ILog4cbHelper logHelper)
        {
            this.config        = config;
            this.quotPublisher = quotPublisher;
            this.logHelper     = logHelper;
            MQConnConfig mqConfig = new MQConnConfig()
            {
                Address = config.Address
            };

            this.stockInfoMQConsumer = new MQConsumer(mqConfig, logHelper);
            this.quotInfoMQConsumer  = new MQConsumer(mqConfig, logHelper);
        }
 public EVoteParamsProvider(StaticInfoProviderConfig config, Log4cb.ILog4cbHelper logHelper) : base(config, logHelper)
 {
 }
 public SocketServer(string ipAddress,int port,Log4cb.ILog4cbHelper logHelper)
 {
     this._port = port;
     this.ServerIPEndPoint = new IPEndPoint(IPAddress.Parse(ipAddress), port);
     this.logHelper = logHelper;
 }
 public DerivativeAuctionParamsProvider(StaticInfoProviderConfig config, Log4cb.ILog4cbHelper logHelper) : base(config, logHelper)
 {
 }
 public SecurityCloseMDProvider(StaticInfoProviderConfig config, Log4cb.ILog4cbHelper logHelper) : base(config, logHelper)
 {
 }
 public RealTimeQuotConnection(ConnectionConfig config, Log4cb.ILog4cbHelper logHelper, IMessagePackRecorder msgPackRecorder = null)
     : base(config, logHelper)
 {
     this.msgPackRecorder = msgPackRecorder;
 }
 public QuotationCenter(Log4cb.ILog4cbHelper logHelper)
 {
     this.logHelper = logHelper;
     ConstructQuotManager();
 }
Exemple #13
0
 public NegotiationParamsProvider(StaticInfoProviderConfig config, Log4cb.ILog4cbHelper logHelper) : base(config, logHelper)
 {
 }
 public BinaryQuotProxy(BinaryQuotProxyConfig config,Log4cb.ILog4cbHelper logHelper)
 {
     this.config = config;
     this.logHelper = logHelper;
 }
 public MQConsumer(MQConnConfig config, Log4cb.ILog4cbHelper logHelper)
 {
     this.config = config;
     this.logHelper = logHelper;
 }
 public MongoMessagePackRecorder(string ip, int port, Log4cb.ILog4cbHelper logHelper)
 {
     this.logHelper = logHelper;
     initMongoDB(ip, port);
 }
 public MongoMessagePackRecorder(string ip, int port, Log4cb.ILog4cbHelper logHelper)
 {
     this.logHelper = logHelper;
     initMongoDB(ip, port);
 }
 public ResendQuotConnection(ConnectionConfig config, Log4cb.ILog4cbHelper logHelper)
     : base(config, logHelper)
 {
 }
Exemple #19
0
 public BinaryQuotProxy(BinaryQuotProxyConfig config, Log4cb.ILog4cbHelper logHelper)
 {
     this.config    = config;
     this.logHelper = logHelper;
 }
 public SocketServer(string ipAddress, int port, Log4cb.ILog4cbHelper logHelper)
 {
     this._port            = port;
     this.ServerIPEndPoint = new IPEndPoint(IPAddress.Parse(ipAddress), port);
     this.logHelper        = logHelper;
 }
 public IndexInfoProvider(StaticInfoProviderConfig config, Log4cb.ILog4cbHelper logHelper) : base(config, logHelper)
 {
 }
 public ConnectionBase(ConnectionConfig config, Log4cb.ILog4cbHelper logHelper)
 {
     this.config    = config;
     this.logHelper = logHelper;
 }
 public MQConsumer(MQConnConfig config, Log4cb.ILog4cbHelper logHelper)
 {
     this.config    = config;
     this.logHelper = logHelper;
 }
Exemple #24
0
 public QuotationCenter(Log4cb.ILog4cbHelper logHelper)
 {
     this.logHelper = logHelper;
     ConstructQuotManager();
 }