Ejemplo n.º 1
0
        protected virtual ResponceMessage Receive(RequestQuoteUpdateMessage message)
        {
            GeneralHelper.FireAndForget(delegate()
            {// Asynchronous.
                SendQuoteUpdate(new TransportInfo[] { message.TransportInfo }, message.SessionInfo);
            });

            if (message.RequestResponce)
            {
                return(new ResponceMessage(true));
            }

            return(null);
        }
        public bool RequestQuoteUpdate(DataSessionInfo sessionInfo, bool waitResult)
        {
            if (OperationalState != OperationalStateEnum.Operational)
            {
                return(false);
            }

            RequestQuoteUpdateMessage requestMessage = new RequestQuoteUpdateMessage(sessionInfo)
            {
                RequestResponse = false
            };

            requestMessage.RequestResponse = waitResult;
            if (waitResult)
            {
                ResponseMessage response = SendAndReceiveResponding <ResponseMessage>(SourceTransportInfo, requestMessage);
                return(response != null && response.OperationResult);
            }
            else
            {
                SendResponding(SourceTransportInfo, requestMessage);
                return(true);
            }
        }
        protected virtual ResponseMessage Receive(RequestQuoteUpdateMessage message)
        {
            GeneralHelper.FireAndForget(delegate()
            {// Asynchronous.
                SendQuoteUpdate(new TransportInfo[] { message.TransportInfo }, message.SessionInfo);
            });

            if (message.RequestResponse)
            {
                return new ResponseMessage(true);
            }

            return null;
        }
        public bool RequestQuoteUpdate(DataSessionInfo sessionInfo, bool waitResult)
        {
            if (OperationalState != OperationalStateEnum.Operational)
            {
                return false;
            }

            RequestQuoteUpdateMessage requestMessage = new RequestQuoteUpdateMessage(sessionInfo) { RequestResponce = false };
            requestMessage.RequestResponce = waitResult;
            if (waitResult)
            {
                ResponceMessage responce = SendAndReceiveResponding<ResponceMessage>(SourceTransportInfo, requestMessage);
                return responce != null && responce.OperationResult;
            }
            else
            {
                SendResponding(SourceTransportInfo, requestMessage);
                return true;
            }
        }