// RequestForPositionsAck message handler private void OnRequestForPositionsAck(RequestForPositionsAck requestForPositionsAck) { Console.WriteLine("OnRequestForPositionsAck()"); Console.WriteLine("\tRequestId = {0}", requestForPositionsAck.getRequestID()); Console.WriteLine("\tgetAccount() = " + requestForPositionsAck.getAccount()); Console.WriteLine("\tgetTotalNumPosReports() = " + requestForPositionsAck.getTotalNumPosReports()); Console.WriteLine("\tgetPosReqStatus() = " + requestForPositionsAck.getPosReqStatus()); Console.WriteLine("\tgetFXCMErrorDetails() = " + requestForPositionsAck.getFXCMErrorDetails()); Console.WriteLine(); if (requestForPositionsAck.getRequestID() == _currentRequest) { if (requestForPositionsAck.getTotalNumPosReports() == 0) { _requestPositionListEvent.Set(); } } }
/// <summary> /// RequestForPositionsAck message handler /// </summary> private void OnRequestForPositionsAck(RequestForPositionsAck message) { if (message.getRequestID() == _currentRequest) { if (message.getTotalNumPosReports() == 0) { _mapRequestsToAutoResetEvents[_currentRequest].Set(); _mapRequestsToAutoResetEvents.Remove(_currentRequest); } } }