Exemplo n.º 1
0
        public TradeConfirmationStatusChangeResponse tradeConfirmationStatusChange(TradeConfirmationStatusChangeRequest tradeConfirmationStatusChangeRequest)
        {
            try
            {
                Log.Info("ConfirmationsManager TradeConfirmationStatusChangeRequest: " + (tradeConfirmationStatusChangeRequest == null ? "null" : tradeConfirmationStatusChangeRequest.ToString()));

                //th real process like update DB etcc.. since it is stub we want kepp this info in separate log file ..
                string procees = String.Format("\n{0} {1} {2} {3} {4}", DateTime.Now.ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                                               tradeConfirmationStatusChangeRequest.tradingSystemCode, tradeConfirmationStatusChangeRequest.tradingSystemKey,
                                               tradeConfirmationStatusChangeRequest.workflowInd, tradeConfirmationStatusChangeRequest.confirmationStatusCode);

                File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + "/ConfStatusChange.txt", procees);
                var response = new TradeConfirmationStatusChangeResponse(true);

                Log.Info("ConfirmationsManager TradeConfirmationStatusChangeResponse: " + (response == null ? "null" : response.ToString()));
                return(response);
            }
            catch (Exception e)
            {
                Log.Error("Failed to process tradeConfirmationStatusChange() service call", e);
                throw e;
            }
        }
        public TradeConfirmationStatusChangeResponse tradeConfirmationStatusChange(TradeConfirmationStatusChangeRequest tradeConfirmationStatusChangeRequest)
        {
            try
            {
                Log.Info("ConfirmationsManager TradeConfirmationStatusChangeRequest: " + (tradeConfirmationStatusChangeRequest == null ? "null" : tradeConfirmationStatusChangeRequest.ToString()));

                //th real process like update DB etcc.. since it is stub we want kepp this info in separate log file ..                
                string procees = String.Format("\n{0} {1} {2} {3} {4}", DateTime.Now.ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                                                 tradeConfirmationStatusChangeRequest.tradingSystemCode, tradeConfirmationStatusChangeRequest.tradingSystemKey,  
                                                 tradeConfirmationStatusChangeRequest.workflowInd, tradeConfirmationStatusChangeRequest.confirmationStatusCode);

                File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory+"/ConfStatusChange.txt", procees);
                var response = new TradeConfirmationStatusChangeResponse(true);

                Log.Info("ConfirmationsManager TradeConfirmationStatusChangeResponse: " + (response == null ? "null" : response.ToString()));
                return response;
            }
            catch (Exception e)
            {
                Log.Error("Failed to process tradeConfirmationStatusChange() service call", e);
                throw e;
            }
        }