public ResponseMessage ProcessOrder(RequestMessage reqMsg) { ResponseMessage responseToDuplicateMessage = _deduplicator.GetExistingResponseMessage(reqMsg.RequestId); if (responseToDuplicateMessage != null) { return(responseToDuplicateMessage); } IOrderOperation orderOperation = _orderOperationFactory.GetOrderOperation(reqMsg.Operation); ResponseMessage response; if (orderOperation != null) { response = orderOperation.ExecuteOperation(reqMsg); } else { _loggerService.WriteLine("Received bad message: " + reqMsg.RequestId, "ProcessOrderError"); response = _responseMessageFactory.CreateBadRequestResponseMessage(reqMsg); } _deduplicator.StoreResponseToMessage(reqMsg.RequestId, response); return(response); }
internal bool Start(int ticks, IOrderOperation OrderOperation, IAccount Account, IHistory History, IMeta Meta) { _maxTicks = ticks; this._OrderOperation = OrderOperation; this._Account = Account; this._History = History; this._Meta = Meta; return(onStart(ticks)); }
public bool TesterStart(int ticks, IOrderOperation OrderOperation, IAccount Account, IHistory History, IMeta Meta, IRegisterTickToHandle registerTickToHandle, string symbol) { _maxTicks = ticks; this.OrderOperation = OrderOperation; this.Account = Account; this.History = History; this.Meta = Meta; this.Symbol = symbol; this.RegisterTickToHandle = registerTickToHandle; return(onStart(ticks)); }