Example #1
0
        public Market GetPrices(long marketId)
        {
            GetPricesRequest request = new GetPricesRequest();
            request.MarketIds = new long[] {marketId};
            request.NumberAgainstPricesRequired = 3;
            request.NumberForPricesRequired = 3;

            GetPricesResponse response =_proxy.GetPrices(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.ConvertMarketTypeWithPricesCollection(response.MarketPrices);
            return marketToReturn[0];
        }
Example #2
0
 /// <remarks/>
 public void GetPricesAsync(GetPricesRequest getPricesRequest, object userState) {
     if ((this.GetPricesOperationCompleted == null)) {
         this.GetPricesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPricesOperationCompleted);
     }
     this.InvokeAsync("GetPrices", new object[] {
                 getPricesRequest}, this.GetPricesOperationCompleted, userState);
 }
Example #3
0
 /// <remarks/>
 public void GetPricesAsync(GetPricesRequest getPricesRequest) {
     this.GetPricesAsync(getPricesRequest, null);
 }
Example #4
0
 /// <remarks/>
 public System.IAsyncResult BeginGetPrices(GetPricesRequest getPricesRequest, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("GetPrices", new object[] {
                 getPricesRequest}, callback, asyncState);
 }
Example #5
0
 public GetPricesResponse GetPrices(GetPricesRequest getPricesRequest) {
     object[] results = this.Invoke("GetPrices", new object[] {
                 getPricesRequest});
     return ((GetPricesResponse)(results[0]));
 }