Esempio n. 1
0
        private void ProcessConnectionStatus(ref ResponseData data)
        {
            var status = (ConnectionStatus)data.Double1;

            switch (status)
            {
            case ConnectionStatus.Disconnected:
            case ConnectionStatus.Uninitialized:
                Connected = false;
                break;

            case ConnectionStatus.Done:
                Connected = true;
                Resubscribe();
                break;
            }

            if (data.Size1 > 0)
            {
                UserLogin = PInvokeUtility.PtrToStruct <RspUserLoginField>(data.Ptr1);
            }
            _spi.ProcessConnectionStatus(status, UserLogin);
        }
Esempio n. 2
0
        private void ProcessQryPosition(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <PositionField>(data.Ptr1);

            _spi.ProcessQryPosition(field, Math.Abs(data.Double1) > double.Epsilon);
        }
Esempio n. 3
0
        private void ProcessLog(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <InternalLogField>(data.Ptr1);

            _spi.ProcessLog(new LogField(field));
        }
Esempio n. 4
0
        private void ProcessRtnTrade(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <TradeField>(data.Ptr1);

            _spi.ProcessRtnTrade(field);
        }
Esempio n. 5
0
        private void ProcessRtnOrder(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <OrderField>(data.Ptr1);

            _spi.ProcessRtnOrder(field);
        }