Esempio n. 1
0
        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];
        }
Esempio n. 2
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);
 }
Esempio n. 3
0
 /// <remarks/>
 public void GetMarketInformationAsync(GetMarketInformationRequest getMarketInformationRequest) {
     this.GetMarketInformationAsync(getMarketInformationRequest, null);
 }
Esempio n. 4
0
 /// <remarks/>
 public System.IAsyncResult BeginGetMarketInformation(GetMarketInformationRequest getMarketInformationRequest, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("GetMarketInformation", new object[] {
                 getMarketInformationRequest}, callback, asyncState);
 }
Esempio n. 5
0
 public GetMarketInformationResponse GetMarketInformation(GetMarketInformationRequest getMarketInformationRequest) {
     object[] results = this.Invoke("GetMarketInformation", new object[] {
                 getMarketInformationRequest});
     return ((GetMarketInformationResponse)(results[0]));
 }