public IMessageIn Visit(MyOrderUpdate msg) { if (_data == null) { // OkCoin sends an empty message without data in response to // our subscription request. return(msg); } switch (msg.ProductType) { case ProductType.Future: msg.Order = ParseFutureState(_data, msg.Currency); break; case ProductType.Spot: msg.Order = ParseSpotState(_data, msg.Currency); break; default: throw new ArgumentException("Invalid ProductType: " + msg.ProductType); } return(msg); }
public string Visit(MyOrderUpdate msg) { return(MyOrders(msg.ProductType, msg.Currency)); }