Beispiel #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);
        }
Beispiel #2
0
        private void ProcessQryPosition(ref ResponseData data)
        {
            var field = PInvokeUtility.PtrToStruct <PositionField>(data.Ptr1);

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

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

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

            _spi.ProcessRtnOrder(field);
        }