public Market GetMarketInformation(long marketId) { GetMarketInformationRequest request = new GetMarketInformationRequest(); request.MarketIds = new long[] {marketId}; GetMarketInformationResponse response = _proxy.GetMarketInformation(request); if (response.ReturnStatus.Code != 0) throw new Exception(response.ReturnStatus.Description); // Since only receive one marketId as param then can assume will always be just one market returned. Market[] marketToReturn = MarketConverter.ConvertMarketTypeCollection(response.Markets); return marketToReturn[0]; }
/// <remarks/> public void GetMarketInformationAsync(GetMarketInformationRequest getMarketInformationRequest, object userState) { if ((this.GetMarketInformationOperationCompleted == null)) { this.GetMarketInformationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMarketInformationOperationCompleted); } this.InvokeAsync("GetMarketInformation", new object[] { getMarketInformationRequest}, this.GetMarketInformationOperationCompleted, userState); }
/// <remarks/> public void GetMarketInformationAsync(GetMarketInformationRequest getMarketInformationRequest) { this.GetMarketInformationAsync(getMarketInformationRequest, null); }
/// <remarks/> public System.IAsyncResult BeginGetMarketInformation(GetMarketInformationRequest getMarketInformationRequest, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMarketInformation", new object[] { getMarketInformationRequest}, callback, asyncState); }
public GetMarketInformationResponse GetMarketInformation(GetMarketInformationRequest getMarketInformationRequest) { object[] results = this.Invoke("GetMarketInformation", new object[] { getMarketInformationRequest}); return ((GetMarketInformationResponse)(results[0])); }